如何检查所有 AD 用户的“空白”密码?

Max*_*eas 7 powershell active-directory

如何检查 AD 中的所有用户是否有空密码? 过滤它们....

我知道如何检查所有用户,但我无法过滤它们...

这是我所拥有的:

Get-ADUser -Filter * -SearchBase "OU=SomeOU,DC=mydomain,DC=forest,DC=local" | ForEach {
   $_.SamAccountName
   (new-object directoryservices.directoryentry "", ("domain\" + $_.SamAccountName), "").psbase.name -ne $null
   Write-Host ""
}
Run Code Online (Sandbox Code Playgroud)

现在我想知道如何过滤输出...

Gre*_*kew 6

没有办法在本地做到这一点。

DS 内部测试-密码质量:

https://github.com/MichaelGrafnetter/DSInternals/blob/master/Documentation/PowerShell/Test-PasswordQuality.md#test-passwordquality

安装模块 -Name DSInternals -Force

这里还有一个使用 DSInternals 的免费应用程序:

https://thycotic.com/solutions/free-it-tools/weak-password-finder/


Swi*_*one 6

您可以找到 PasswordLastSet 为空的用户:

Get-ADUser -Filter * -SearchBase "OU=SomeOU,DC=mydomain,DC=forest,DC=local" -Properties PasswordLastSet | where { $_.PasswordLastSet -eq $null}
Run Code Online (Sandbox Code Playgroud)