Share via


GetCollectionsWithResourcePermissions Method in Class SMS_SecuredObject

Applies To: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

In Configuration Manager, the GetCollectionsWithResourcePermissions Windows Management Instrumentation (WMI) class method gets the list of collection identifiers for which the user has the specified permissions. The collection must contain the specified resource.

The following syntax is simplified from Managed Object Format (MOF) code, and it is intended to show the definition of the method.

UInt32 GetCollectionsWithResourcePermissions(
     UInt32 ResourceID,
     UInt32 Permissions,
     String CollectionIDs[]
);

Parameters

  • ResourceID
    Data type: UInt32

    Qualifiers: [in]

    Unique ID, supplied by Configuration Manager, for the resource.

  • Permissions
    Data type: UInt32

    Qualifiers: [in]

    Set of user permissions for the collections that contain the resource.

  • CollectionIDs
    Data type: String Array

    Qualifiers: [out]

    IDs of collections for which the user has the specified permissions.

Return Values

A UInt32 data type.

Example Code

The following example shows how to call the GetCollectionsWithResourcePermissions method to get the list of collections that contain the resource to which the user has permissions to delete resources.

Dim Security As SWbemObject
Dim Collections() As Variant
Set Security = GetObject("winmgmts:root\sms\site_<sitecode>:SMS_SecuredObject")
Security.GetCollectionsWithResourcePermissions <resourceid>, 512, Collections

Requirements

Runtime Requirements

For more information, see Configuration Manager Server Runtime Requirements.

Development Requirements

For more information, see Configuration Manager Server Development Requirements.

See Also

Concepts

SMS_SecuredObject Server WMI Class
UserHasPermissions Method in Class SMS_SecuredObject