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

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

Import-Module ActiveDirectoryword

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

相关文章
相关标签/搜索