類別SMS_Collection的 AddMembershipRule 方法

AddMembershipRule Configuration Manager 中,Windows Management Instrumentation (WMI) 類別方法會將新規則新增至 CollectionRulesSMS_Collection Server WMI 類別的 屬性。

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

語法

SInt32 AddMembershipRule(  
     SMS_CollectionRule collectionRule,  
     UInt32 QueryID  
);  

參數

collectionRule
資料類型:SMS_CollectionRule

限定詞:[in]

SMS_CollectionRule要加入的伺服器 WMI 類別 物件。

QueryID
資料類型:UInt32

限定 符: [out]

如果規則是查詢規則,Configuration Manager產生的查詢識別碼。 如果規則是直接的,則此識別碼為 0。 使用 QueryID 來修改或刪除查詢成員資格規則。

傳回值

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

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

需求

執行時間需求

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

開發需求

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

另請參閱

SMS_Collection伺服器 WMI 類別
SMS_Site伺服器 WMI 類別