Created
May 11, 2021 10:27
-
-
Save i386net/524552dd476bd9fce59eaa19d22925e8 to your computer and use it in GitHub Desktop.
Find AD users with blank or weak passwords
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
Get-ADUser -Filter * -SearchBase "OU=some_ou,DC=some_domain,DC=local" | ForEach { | |
$_.SamAccountName | |
(new-object directoryservices.directoryentry "", ("domain\" + $_.SamAccountName), "123456").psbase.name -ne $null | |
Write-Host "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment