ntdsutil"设置dsrm密码" "重置服务器%1" "新密码" "新密码" q q
我试过但仍然是手动询问密码请提供一些脚本,以便在提示时自动输入密码
答案 0 :(得分:1)
Set WshShell = WScript.CreateObject("WScript.Shell"):
WshShell.Run "cmd", 9:
WScript.Sleep 500:
WshShell.SendKeys " ntdsutil ":
WshShell.SendKeys "{ENTER}":
WshShell.SendKeys "{set dsrm password}":
WshShell.SendKeys "{ENTER}":
WshShell.SendKeys "{sync from domain account Admin}":
WshShell.SendKeys "{ENTER}":
WshShell.SendKeys "Hello World!":
WshShell.SendKeys "{ENTER}":
WScript.Sleep(2000):
WshShell.SendKeys "Hello World!":
WshShell.SendKeys "{ENTER}":