重置AD用户密码

 

$cc = import-csv D:\Powershell\Tauba.csv
foreach ($c in $cc)
{
$c.username
$pwd = $c.password
get-aduser $c.username | Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText  "$pwd" -Force)
}

 

posted on 2017-11-20 10:52  momingliu11  阅读(1878)  评论(0编辑  收藏  举报