Last active
July 30, 2019 23:47
-
-
Save nshores/7e7c58913ec53b11160632b0bcd0753c to your computer and use it in GitHub Desktop.
failed_windows_logins.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$a = Get-EventLog -LogName 'Security' -InstanceId 4776 | select ReplacementStrings | |
$array = @() | |
foreach ($b in $a) { | |
$array += $($b[0].ReplacementStrings)[1] | |
} | |
Write-Output $array | |
Write-Output "Final Count"$array.Count | |
$array | out-file fail.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment