Share via


Service.ServiceState Property

Definition

Gets the state of the SQL Server service, such as running, stopped, or paused.

public:
 property Microsoft::SqlServer::Management::Smo::Wmi::ServiceState ServiceState { Microsoft::SqlServer::Management::Smo::Wmi::ServiceState get(); };
public Microsoft.SqlServer.Management.Smo.Wmi.ServiceState ServiceState { get; }
member this.ServiceState : Microsoft.SqlServer.Management.Smo.Wmi.ServiceState
Public ReadOnly Property ServiceState As ServiceState

Property Value

Microsoft.SqlServer.Management.Smo.Wmi.ServiceState

A Microsoft.SqlServer.Management.Smo.Wmi.ServiceState object value that specifies the state of the SQL Server service.

Examples

Managing Services and Network Settings by Using WMI Provider

Applies to