您好,
感谢您的发帖。
请先创建一个csv文件,按下图格式进行编辑。

然后运行以下命令。请将csvfile
修改为您创建文件所在的路径。
$user=import-csv -Path csvfile
foreach($user in $users)
{
Set-ADAccountPassword -Identity $_.identity -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "$_.NewPassword" -Force)
}
希望以上信息有所帮助。
Best regards,
Kallen
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com.