Get-CMDeviceCollectionExcludeMembershipRule

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

Syntax

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

Description

The Get-CMDeviceCollectionExcludeMembershipRule cmdlet retrieves the rules that exclude the members of another collection from the device collections where the rule is applied. You can specify the device collections where the rule is applied by name, ID, or an object that represents the collections. You can specify the collection whose members are excluded by name, ID, or an object that represents the collection.

Microsoft System Center Configuration Manager dynamically updates the membership of the device 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 rules from a device collection

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

This command gets the rules that exclude the members of the collection that has the ID SMSDM001 from the device collection that has the ID 9990000D.

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
-ExcludeCollection
Type:IResultObject
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExcludeCollectionId
Type:String
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

Optional Parameters

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