学习自:

徐鹏老师的 AD Powershell 系列视频课程


批量更改AD用户的密码

Get-ADUser -SearchBase "ou=Lab,dc=satid,dc=com" -Filter * | foreach { Set-ADAccountPassword -Identity $_.name -NewPassword (ConvertTo-SecureString abc@123 -AsPlainText -Force)}

wKioL1mC4uzDULqsAADL2M4dN3Q727.jpg-wh_50