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)
现在我想知道如何过滤输出...
没有办法在本地做到这一点。
DS 内部测试-密码质量:
安装模块 -Name DSInternals -Force
这里还有一个使用 DSInternals 的免费应用程序:
https://thycotic.com/solutions/free-it-tools/weak-password-finder/
您可以找到 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)
归档时间: |
|
查看次数: |
3160 次 |
最近记录: |