1

ntdsutil "设置 dsrm 密码" "重置服务器 %1 上的密码" "newpassword" "newpassword" qq

我已经尝试过,但仍然是手动询问密码 请提供一些脚本以在提示时自动输入密码

4

1 回答 1

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}":

于 2015-02-13T07:38:24.217 回答