logo资料库

Win20082012r2下批量更改域用户密码.pdf

第1页 / 共1页
资料共1页,全文预览结束
Win2008/2012r2下批量更改域用 户密码 1、打开Windows PowerShell加载AD模块: Import-Module ActiveDirectory 2、更改所有域用户的密码: Get-ADUser -filter * -SearchBase 'DC=xxx,DC=com' | Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "123abcABC" - Force) 3、更改指定“test”OU中所有域用户的密码: Get-ADUser -filter * -SearchBase 'OU=test,DC=xxx,DC=com' | Set-ADAccountPassword - Reset -NewPassword (ConvertTo-SecureString - AsPlainText "123abcABC" -Force) 4、设置域用户下次登陆时不需要更改密码: Get-ADUser -filter * -SearchBase 'DC=xxx,DC=com' | Set-ADUser -ChangePasswordAtLogon $false
分享到:
收藏