在Windows Server 2008 R2中批量更新指定OU下的所有用户口令

在PowerShell分别执行下面两条语句

Import-Module ActiveDirectory

Get-ADUser -filter * -SearchBase 'OU=OUNAME,DC=DOMAINNAME,DC=DOMAINLOCAL' | Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "NEWPASSWORD" -Force)

posted @ 2013-11-08 16:42  Joshua_Li  阅读(184)  评论(0编辑  收藏  举报