Get-CMUserCollectionExcludeMembershipRule

Gets the exclude membership rules from one or more user collections in the Configuration Manager hierarchy.

Syntax

Get-CMUserCollectionExcludeMembershipRule
   -CollectionId <String>
   -ExcludeCollection <IResultObject>
   [<CommonParameters>]
Get-CMUserCollectionExcludeMembershipRule
   -CollectionId <String>
   -ExcludeCollectionId <String>
   [<CommonParameters>]
Get-CMUserCollectionExcludeMembershipRule
   -CollectionId <String>
   [-ExcludeCollectionName <String>]
   [<CommonParameters>]
Get-CMUserCollectionExcludeMembershipRule
   -CollectionName <String>
   [-ExcludeCollectionName <String>]
   [<CommonParameters>]
Get-CMUserCollectionExcludeMembershipRule
   -CollectionName <String>
   -ExcludeCollection <IResultObject>
   [<CommonParameters>]
Get-CMUserCollectionExcludeMembershipRule
   -CollectionName <String>
   -ExcludeCollectionId <String>
   [<CommonParameters>]
Get-CMUserCollectionExcludeMembershipRule
   -InputObject <IResultObject>
   -ExcludeCollection <IResultObject>
   [<CommonParameters>]
Get-CMUserCollectionExcludeMembershipRule
   -InputObject <IResultObject>
   -ExcludeCollectionId <String>
   [<CommonParameters>]
Get-CMUserCollectionExcludeMembershipRule
   -InputObject <IResultObject>
   [-ExcludeCollectionName <String>]
   [<CommonParameters>]

Description

The Get-CMUserCollectionExcludeMembershipRule cmdlet retrieves the rules that exclude the members of another collection from the user collections where the rule is applied. You can specify the user collections where the rule is applied by using their names, IDs, or by specifying an object that represents the collections. You can specify the collection whose members are excluded by using its name, ID, or an object that represents the collection.

Microsoft System Center Configuration Manager dynamically updates the membership of the user collection on a schedule if the membership of the excluded collection changes. For more information about membership rules, see Introduction to Collections in Configuration Manager on TechNet.

Examples

Example 1: Get the exclude membership rule from a user collection

PS C:\> Get-CMUserCollectionExcludeMembershipRule -CollectionId "9990000D" -ExcludeCollectionId "SMSDM001"

This command gets the rule that excludes the members of the collection that has the ID SMSDM001 from the user collection that has the ID 9990000D.

Required Parameters

-CollectionId
Type:String
Aliases:Id
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CollectionName
Type:String
Aliases:Name
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExcludeCollection
Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExcludeCollectionId
Type:String
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
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

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