Get-CMUserCollectionDirectMembershipRule

Gets the direct membership rules of one or more user collections in the Configuration Manager hierarchy.

Syntax

Get-CMUserCollectionDirectMembershipRule
   -CollectionId <String>
   -Resource <IResultObject>
   [<CommonParameters>]
Get-CMUserCollectionDirectMembershipRule -CollectionId  -ResourceId  []
Get-CMUserCollectionDirectMembershipRule -CollectionId  [-ResourceName ] []
Get-CMUserCollectionDirectMembershipRule -CollectionName  [-ResourceName ] []
Get-CMUserCollectionDirectMembershipRule -CollectionName  -Resource 
 []
Get-CMUserCollectionDirectMembershipRule -CollectionName  -ResourceId  []
Get-CMUserCollectionDirectMembershipRule -InputObject  -Resource 
 []
Get-CMUserCollectionDirectMembershipRule -InputObject  -ResourceId  []
Get-CMUserCollectionDirectMembershipRule -InputObject  [-ResourceName ]
 []

Description

The Get-CMUserCollectionDirectMembershipRule cmdlet retrieves the direct rules of the specified collections. You can specify the user collections by using their names, IDs, or by specifying an object that represents the collections.

A direct rule lets you explicitly choose the members of the user collection. For more information about collection rules, see Introduction to Collections in Configuration Manager on TechNet.

Examples

Example 1: Get a direct membership rule

PS C:\> Get-CMUserCollectionDirectMembershipRule -CollectionName "All Mobile Devices" -ResourceId "Res_94412512"

This command gets the direct membership rule that has the Id Res_94412512 for the collection named All Mobile Devices.

Required Parameters

-CollectionId
Type:String
Aliases:Id
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CollectionName
Type:String
Aliases:Name
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.

Type:IResultObject
Aliases:Collection
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Resource
Type:IResultObject
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceId
Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-ResourceName
Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False