0
我有以下PowerShell来输出失败的登录事件IP地址的列表:PowerShell的 - 房源从安全日志失败的IP地址,包括数
$DT = [DateTime]::Now.AddDays(-1) # check only last 24 hours
$l = Get-EventLog -LogName 'Security' -InstanceId 4625 -After $DT | Select-Object @{n='IpAddress';e={$_.ReplacementStrings[-2]} }
$g = $l | group-object -property IpAddress | where {$_.Count -gt 20} | Select -property Name | export-csv c:\users\export.csv
我真的想改善它,所以它的输出像现在这样的IP地址,再加上$ _。Count。我已经尝试了一些东西,但我认为我陷入了SQL世界!