Microsoft Operations Manager

GetServiceStatus Method

The GetServiceStatusmethod gets the status of the specified service.

SCManager.GetServiceStatus(ServiceName Variant, ServiceStatus
Variant, [ServiceStatusNumber Variant], [ComputerName Variant])


Specifies the name of the service to retrieve status.
Returns the status of the specified service as a string. Possible values are Stopped, Running, Start Pending, Stop Pending, Continue Pending, Pause Pending, and Paused.
Returns the status of the specified service as a number. This parameter is optional. Possible values are 1 - Stopped, 2 - Start Pending, 3 - Stop Pending, 4 - Running, 5 - Continue Pending, 6 - Pause Pending, and 7 - Paused.
Specifies the target computer. This parameter is optional. If the target computer is not specified or the parameter is an empty string, the local computer is the target.

Return Value



The SCManagerobject should not be used when creating new scripts. It is included only to support existing scripts. For more information about equivalent APIs, see Using Operating System APIs in Scripts.


Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

SCManager Object

Did you find this information useful? Please send your suggestions and comments about the documentation to