简体   繁体   中英

Running a command on multiple Windows servers

I maintain a number of load balanced web servers running Windows Server 2003. Today when I want to make a change to those servers, I use a tedious process of opening a remote desktop connection to each of those servers then running a command from the command prompt on each server. This takes a lot of time.

What I would like to do is run a command or write a script on one central server which accesses each of these other Windows servers and runs the same command on each of them. In this scenario I would want to run the command on 5 to 10 servers, but probably not more than 10.

The commands being run on the remote servers could be any of the following:

Copy a file Recompile - we already have a .bat file on each server for this. Source control (SVN) check out or update. Any other command that could be run from the windows command shell.

Also, I have domain administrator privileges as well as specific login and password info for each of these servers.

I know how to do this in Linux/Unix with SSH, so please do answers that say switch to Linux.

Thanks in advance for the help.

你可以试试SysInternals PsExec

Install a RSH server on Windows.

RSH originally existed under UNIX and so is also present under Linux.

I used this solution about ten years ago for a distributed build system, which concurrently built a couple of applications on Windows, Solaris and HPUX. An RSH server ran on each machine and the controlling machine issued commands to them.

We used a third party RSH server, the name of which escapes me.

Windows Server used to ship with an RSH demon, but I think it's just been removed from the build.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM