Active Directory Powershell 腳本

Reset set of Active Directory User’s Password

 管理員權限開啟 Windows Powershell ISE 添加以下腳本
Import-Module ActiveDirectory
$newPassword = ConvertTo-SecureString -AsPlainText "P@ssw09rd" -Force
Get-ADUser -LDAPfilter '(name=*)'`
  -SearchBase "OU=TestOU,DC=TestDomain,DC=local" | 
Set-ADAccountPassword  -NewPassword $newPassword -Reset

按運行

版权声明:
作者:ianext
链接:https://www.ianext.com/adps1/
来源:粵分享越快樂
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>