类SMS_Collection中的 AddMembershipRule 方法

AddMembershipRule在 Configuration Manager 中,Windows Management Instrumentation (WMI) 类方法将新规则添加到 CollectionRulesSMS_Collection 服务器 WMI 类的 属性。

以下语法从托管对象格式 (MOF) 代码中简化,并定义了 方法。

语法

SInt32 AddMembershipRule(  
     SMS_CollectionRule collectionRule,  
     UInt32 QueryID  
);  

参数

collectionRule
数据类型SMS_CollectionRule

限定符:[in]

SMS_CollectionRule要添加的服务器 WMI 类 对象。

QueryID
数据类型UInt32

限定 符: [out]

如果规则是查询规则,则Configuration Manager生成的查询 ID。 如果规则是直接的,则此 ID 为 0。 使用 QueryID 修改或删除查询成员身份规则。

返回值

一个 SInt32 数据类型,为 0 表示成功,非零表示失败。

有关处理返回的错误的详细信息,请参阅关于Configuration Manager错误

要求

运行时要求

有关详细信息,请参阅Configuration Manager服务器运行时要求

开发要求

有关详细信息,请参阅Configuration Manager服务器开发要求

另请参阅

SMS_Collection服务器 WMI 类
SMS_Site 服务器 WMI 类