' This script was originally published in the Exchange Cookbook, ' (http://www.exchangebookcook.com). Written by Paul Robichaux, ' Missy Koslosky, and Devin Ganger. Redistributed with permission ' of the publisher, O'Reilly & Associates. ' This code uses WMI to start the specified service. ' ------ SCRIPT CONFIGURATION ------ strComputerName = "" ' e.g. exch01 strSvcName = "" ' e.g. MSExchangeIS ' ------ END CONFIGURATION --------- ' get the service object set objComputer = GetObject("WinNT://" & strComputerName & ",computer") set objService = objComputer.GetObject("Service", strSvcName) svcStatus = objService.Status ' Ideally we should check the Status property of the service object ' so we don't try to stop or start a service that's already in the ' desired state objService.Start do until svcStatus = ADS_SERVICE_RUNNING lngStatus = objService.Status loop