如何从Windows7中我自己计算机的命令提示符访问另一台计算机的命令提示符?
我希望可以在批处理文件中执行类似的操作:
Enter \\ComputerA -u John -p 123
Run some commands on ComputerA
Leave ComputerA
Enter \\ComputerB -u Jane -p 123
Run some commands on ComputerB
Leave ComputerB
Return to on my computer's console
就像在Task Scheduler中一样,我可以连接到另一台计算机,并从我的计算机远程执行一些操作。
我可以在cmd中执行此操作吗?
检出MS工具psexec(以前是sysinternals)
来自:http : //technet.microsoft.com/zh-cn/sysinternals/bb897553.aspx
Usage: psexec [\\computer[,computer2[,...] | @file]][-u user [-p psswd][-n s][-r servicename][-h][-l][-s|-e][-x][-i [session]][-c [-f|-v]][-w directory][-d][-<priority>][-a n,n,...] cmd [arguments]
您可以在应用程序中使用双引号将名称中包含空格的应用程序括起来,例如
psexec \\marklap "c:\long name app.exe"
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句