Service.ServiceState 屬性

定義

取得 SQL Server 服務的狀態,例如 [執行中]、[已停止] 或 [已暫停]。

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

屬性值

Microsoft.SqlServer.Management.Smo.Wmi.ServiceState

Microsoft.SqlServer.Management.Smo.Wmi.ServiceState物件值,指定 SQL Server 服務的狀態。

範例

使用 WMI 提供者管理服務和網路設定

適用於