類別 SMS_Site 中的 UpdateFeatureState 方法

UpdateFeatureState在 Configuration Manager 中,Windows Management Instrumentation (WMI) 類別方法更新功能的啟用/停用狀態。

下列語法是從 [受控物件格式] 簡化而 (MOF) 程式碼,並定義方法。

語法

SInt32 UpdateFeatureState (
     String SiteCode,
     UInt32 FeatureID,
     Boolean IsEnabled
);

參數

SiteCode 資料類型: String

限定詞:[in]

要檢查的網站的網站代碼。 NULL 表示目前網站。

FeatureID 資料類型: UInt32

限定詞:[in]

功能識別碼。 可能的值為:

值 功能識別碼
1 SleepServer

IsEnabled 資料類型: Boolean

限定詞:[in]

true 如果已啟用此功能。

傳回值

SInt32資料類型為 0 表示成功,非零表示失敗。

如需處理傳回錯誤的相關資訊,請參閱 關於 Configuration Manager 錯誤。

需求

執行階段需求

如需詳細資訊,請參閱 Configuration Manager 伺服器執行階段需求。

開發需求

如需詳細資訊,請參閱 Configuration Manager 伺服器開發需求。

另請參閱

SMS_Site Server WMI 類別