• RSS
  • Twitter
  • FaceBook

How To Set Multiple Services On Multiple Remote Computers

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:

Steps:

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.

 

About Nirmal Sharma

Nirmal is a Microsoft MVP in Directory Services and working as a Technical Architect/Consultant. He has been involved in Microsoft Technologies since 1994 and followed the progression of Microsoft Operating Systems and software. He is specialized in Directory Services, Microsoft Clustering, SQL, MOM, Exchange and Citrix. In his spare time, he likes to help others and write "internal" technical articles, white papers and tips on various Microsoft technologies. You can contact him at nirmal_sharma@mvps.org.


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred data recovery solution?