使用for语句来执行重置密码:

For /F "tokens=1" %%a in (user.txt) do dsquery user -samid %%a | dsmod user -pwd abc123@

其中user.txt内容为需要重置密码的域账户,放在c盘根目录执行bat