vbs script to check hostname and i fhostname is x y or z stop then start a service
Using SCOM 2007 and we have three servers that host a service which occasionally use up all the memory. This generates a critical memory useage error on SCOM and you can set it to run a script if this happens. Unfortunately we dont want to run this script on every host which runs out of memory as the service only exists on three.
Can anyone help in starting a script that checks if the hostname is server1, server2 or server3 then run a net stop then start on a service?