Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can somebody give me a script advice/example of how to restart services?

I have to restart 17 services, but the first 4 services have to be in the right order and after the restart command is given to one of the services, the next one should be started when the previous one is finished.

I know I can restart a service by net command, and I can build a delay by for example a ping command that repeats for an x amount of times, but I never know in advance how long it is going to take for a service to restart.

Thanks, Kindest regards, Marcel

share|improve this question
up vote 1 down vote accepted

On our BES we have these scripts


net start "BlackBerry Router"
net start "BlackBerry Dispatcher"
net start "BlackBerry Controller"
net start "BlackBerry Policy Service"
net start "BlackBerry SyncServer"
net start "BBAttachServer"
net start "BlackBerry MDS Connection Service"
net start "Blackberry Server Alert"
net start "Blackberry Database Consistency Service"


net stop "Blackberry Server Alert"
net stop "BBAttachServer"
net stop "BlackBerry Controller"
net stop "BlackBerry Dispatcher"
net stop "BlackBerry MDS Connection Service"
net stop "BlackBerry Policy Service"
net stop "BlackBerry Router"
net stop "BlackBerry SyncServer"
net stop "Blackberry Database Consistency Service"
share|improve this answer
thank you Jamespo – Feb 17 '10 at 15:33

If you put the net stop commands in a batch file in the order that the services need to be stopped and started they will be processed one after another. The first service will stop, then the second, etc. The second and subsequent services (net stop commands) won't be processed until the previous one completes.

share|improve this answer
Thank you for your quick answer! – Feb 17 '10 at 13:33
Glad to help... – joeqwerty Feb 17 '10 at 14:33

make it scripted and ensure this runs everyday at early mornings.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.