Skip to content

Latest commit

 

History

History
216 lines (157 loc) · 6.07 KB

Get-CMDeviceCollectionExcludeMembershipRule.md

File metadata and controls

216 lines (157 loc) · 6.07 KB

external help file: AdminUI.PS.psm1-help.xml Module Name: ConfigurationManager ms.date: 12/28/2021 schema: 2.0.0 title: Get-CMDeviceCollectionExcludeMembershipRule

Get-CMDeviceCollectionExcludeMembershipRule

SYNOPSIS

Get an exclude membership rule for a device collection.

SYNTAX

ByNameAndName (Default)

Get-CMDeviceCollectionExcludeMembershipRule -CollectionName <String> [-ExcludeCollectionName <String>]
 [<CommonParameters>]

ByNameAndValue

Get-CMDeviceCollectionExcludeMembershipRule -CollectionName <String> -ExcludeCollection <IResultObject>
 [<CommonParameters>]

ByNameAndId

Get-CMDeviceCollectionExcludeMembershipRule -CollectionName <String> -ExcludeCollectionId <String>
 [<CommonParameters>]

ByIdAndValue

Get-CMDeviceCollectionExcludeMembershipRule -CollectionId <String> -ExcludeCollection <IResultObject>
 [<CommonParameters>]

ByIdAndId

Get-CMDeviceCollectionExcludeMembershipRule -CollectionId <String> -ExcludeCollectionId <String>
 [<CommonParameters>]

ByIdAndName

Get-CMDeviceCollectionExcludeMembershipRule -CollectionId <String> [-ExcludeCollectionName <String>]
 [<CommonParameters>]

ByValueAndValue

Get-CMDeviceCollectionExcludeMembershipRule -InputObject <IResultObject> -ExcludeCollection <IResultObject>
 [<CommonParameters>]

ByValueAndId

Get-CMDeviceCollectionExcludeMembershipRule -InputObject <IResultObject> -ExcludeCollectionId <String>
 [<CommonParameters>]

ByValueAndName

Get-CMDeviceCollectionExcludeMembershipRule -InputObject <IResultObject> [-ExcludeCollectionName <String>]
 [<CommonParameters>]

DESCRIPTION

Use this cmdlet to get one or more exclude membership rules for a device collection. An exclude membership rule excludes the members of another collection from the device collections where the rule is applied.

Configuration Manager dynamically updates the membership of the device collection on a schedule if the membership of the excluded collection changes.

For more information, see How to create collections in Configuration Manager.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

EXAMPLES

Example 1: Get the exclude membership rules for a device collection

This command gets the rules that exclude the members of the collection with ID SMSDM001 from the device collection with ID XYZ00012.

Get-CMDeviceCollectionExcludeMembershipRule -CollectionId "XYZ00012" -ExcludeCollectionId "SMSDM001"

PARAMETERS

-CollectionId

Specify the ID of the device collection to get the rule. This value is the CollectionID property, for example, XYZ00012. Since default collections don't have exclude membership rules, this ID starts with the site code and not SMS.

Type: String
Parameter Sets: ByIdAndValue, ByIdAndId, ByIdAndName
Aliases: Id

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CollectionName

Specify the name of the device collection to get the rule.

Type: String
Parameter Sets: ByNameAndName, ByNameAndValue, ByNameAndId
Aliases: Name

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeCollection

Specify an object for the excluded collection to get the rule. To get this object, use the Get-CMCollection or Get-CMDeviceCollection cmdlets.

Type: IResultObject
Parameter Sets: ByNameAndValue, ByIdAndValue, ByValueAndValue
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeCollectionId

Specify the ID of the excluded collection to get the rule. This value is the CollectionID property, for example, XYZ00012. You can exclude default collections, so this value can start with either the site code or SMS.

Type: String
Parameter Sets: ByNameAndId, ByIdAndId, ByValueAndId
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeCollectionName

Specify the name of the excluded collection to get the rule.

Type: String
Parameter Sets: ByNameAndName, ByIdAndName, ByValueAndName
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject

Specify an object for the device collection to get the rule. To get this object, use the Get-CMCollection or Get-CMDeviceCollection cmdlets.

Type: IResultObject
Parameter Sets: ByValueAndValue, ByValueAndId, ByValueAndName
Aliases: Collection

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

OUTPUTS

System.Object

NOTES

RELATED LINKS

Add-CMDeviceCollectionExcludeMembershipRule Remove-CMDeviceCollectionExcludeMembershipRule

Get-CMCollectionExcludeMembershipRule

Get-CMCollection Get-CMDeviceCollection

Get-CMUserCollectionExcludeMembershipRule

How to create collections in Configuration Manager