cls$pass = ConvertTo-SecureString -AsPlainText 12333333344.abc -Force Import-Csv -Path d:pp.csv | foreach { Get-ADUser -Identity $_.name|Set-ADAccountPassword -Reset -NewPassword $passGet-ADUser -Identity $_.name|Set-ADUser -ChangePasswordAtLogon $false$_.name}这个脚本运行,需要本地装有Active Directory的模块,不需要手动导入,自动挂载。
namewangerxiaodongcunrui本文出自 “九叔-微软私有云” 博客