PSEXEC可以做你想做
http://technet.microsoft.com/en-us/sysinternals/bb897553
usage: psexec \\computer [-u username [-p password]] [-s] [-c [-f]] [-d] program [arguments]
-u Specifies optional user name for login to remote computer.
-p Specifies optional password for user name. If you omit this you will be prompted to enter a hidden password.
-s Run remote process in the System account .
-c Copy the specified program to the remote system for execution. If you omit this option then the application must be in the system's path on the remote system.
-f Copy the specified program to the remote system even if the file already exists on the remote system.
-d Don't wait for application to terminate. Only use this option for non-interactive applications.
Examples
The following command launches an interactive command prompt on \\marklap:
psexec \\marklap cmd
This command executes IpConfig on the remote system with the /all switch, and displays the resulting output locally:
psexec \\marklap ipconfig /all
This command copies the program test.exe to the remote system and executes it interactively:
psexec \\marklap -c test.exe
Specify the full path to a program that is already installed on a remote system if its not on the system's path:
psexec \\marklap c:\bin\test.exe
src: http://www.governmentsecurity.org/forum/index.php?showtopic=1030
我在Linux所以我现在不能对此进行测试的。
for /l %%c in (1,1,254) do start psexec \\192.168.1.%%c -d -u administrator -p pass "net use Z: \\yourserver\user$ && Z:\update.exe && net use Z: /delete"
非常好的信息。我不确定那是我在找什么。我可以肯定地将它用于onesies和twosies,但70多台机器会让我的系统停滞不前,并使修补过程非常漫长。我想到的基本上是在远程机器上执行一个脚本,指向他们从共享服务器(而不是我的盒子)安装补丁。这样我所要做的就是执行脚本并让它运行。 基本上,我是A点,我希望B点在C点执行该文件。我该怎么做? – Morgan
我添加了一个可能有帮助的班轮 –