我有一个 VBScript,我希望能够在 powershell 中运行,但由于某种原因 @ 不想被打印出来。它停在“ssh root”处,然后无法继续。不要介意 x 等密码。
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "powershell.exe"
WScript.Sleep 500
WshShell.SendKeys "ssh -y -l swupdate 169.254.x.xx -o HostkeyAlgorithms=ssh-rsa"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 300
WshShell.SendKeys "something"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 300
WshShell.SendKeys "ssh [email protected] -y"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1500
WshShell.SendKeys "something"
WshShell.SendKeys "{ENTER}"
将
@
括在 {}
中:
WshShell.SendKeys "ssh root{@}198.19.x.x -y"