How To Set Multiple Services On Multiple Remote Computers

by [Published on 15 June 2010 / Last Updated on 30 July 2009]

This article explains setting up multiple services on remote computers.

This article can be useful for users who want to set multiple services on remote computers. The following steps can be performed to accomplish this:


1. Create a text file: Comps.TXT

2. Put all the computer names in it.

3. Create another text file and put all the services you want to start: Services.TXT

4. Create a batch file: SetServices.CMD and put the following lines in it:

  • @ Echo OFF 
  • setlocal enabledelayedexpansion
  • FOR /F "Tokens=*" %%L IN (Comps.TXT) DO (
  • SET CompName=%%L
  • FOR /F "Tokens=*" %%L IN (Services.TXT) DO SC \\!CompName! Start %%L auto
  • )
  • )

5. Finally, run the SetServices.CMD from a command window.

The above script start the services mentioned in the Services.TXT file on computers mentioned in the Comps.TXT file.


Featured Links