Remove-CMDeviceCollectionExcludeMembershipRule

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

Syntax

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

Description

The Remove-CMDeviceCollectionExcludeMembershipRule cmdlet removes an exclude rule from the specified collections. You can specify the device collections by name, ID, or 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 the exclude membership rules from a device collection

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

This command removes 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
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
-ExcludeCollectionName
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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Force
Type:SwitchParameter
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
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False