Scripting Challenge, Automatic Server rRstart and Checking Services have started
Posted on 2011-10-04
I have 6 x Windows 2008 servers (lets call them s1, s2, s3, s4 s5, s6). I need to reboot all servers automatically using a script and ensure that specific application services are running .(sometimes these don't start correctly even though they are set to automatically start so if they havent srarted I need to start them).
So the script should look like:
stop all services accross S1, S2, S3, S4, S5, S6.
ensure all application services are started on S1 in the correct order: service1, service2, service3,
ensure all application services are started on S4 in the correct order: service1, service2, service3,
Reboot S2, S3, S5, S6 in any order
ensure single application service service3 has been started on these servers.
It's a bit challenging but should be easy for the scripting gurus amongst you,