Remove-CMUserCollectionExcludeMembershipRule

Removes an exclude membership rule from one or more user collection in the Configuration Manager hierarchy.

Syntax

Remove-CMUserCollectionExcludeMembershipRule
      -CollectionId <String>
      [-Confirm]
      -ExcludeCollection <IResultObject>
      [-Force]
      [-WhatIf]
      [<CommonParameters>]
Remove-CMUserCollectionExcludeMembershipRule -CollectionId  [-Confirm] -ExcludeCollectionId 
 [-Force] [-WhatIf] []
Remove-CMUserCollectionExcludeMembershipRule -CollectionId  [-Confirm] -ExcludeCollectionName 
 [-Force] [-WhatIf] []
Remove-CMUserCollectionExcludeMembershipRule -CollectionName  [-Confirm]
 -ExcludeCollectionName  [-Force] [-WhatIf] []
Remove-CMUserCollectionExcludeMembershipRule -CollectionName  [-Confirm]
 -ExcludeCollection  [-Force] [-WhatIf] []
Remove-CMUserCollectionExcludeMembershipRule -CollectionName  [-Confirm] -ExcludeCollectionId 
 [-Force] [-WhatIf] []
Remove-CMUserCollectionExcludeMembershipRule [-Confirm] -ExcludeCollection  [-Force]
 -InputObject  [-WhatIf] []
Remove-CMUserCollectionExcludeMembershipRule [-Confirm] -ExcludeCollectionId  [-Force]
 -InputObject  [-WhatIf] []
Remove-CMUserCollectionExcludeMembershipRule [-Confirm] -ExcludeCollectionName  [-Force]
 -InputObject  [-WhatIf] []

Description

The Remove-CMUserCollectionExcludeMembershipRule cmdlet removes an exclude rule from the specified collections. You can specify the user collections by using their names, IDs, or by specifying an input object that represents the collections.

For more information about collection rules in Microsoft System Center Configuration Manager, see Introduction to Collections in Configuration Manager on TechNet.

Examples

Example 1: Remove an exclude membership rule

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

This command removes the exclude membership rule that has the ID SMSDM001 from the user collection that has the ID in the 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
-ExcludeCollectionName
Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject
Type:IResultObject
Aliases:Collection
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Force
Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False