Remove-​CM​User​Collection​Direct​Membership​Rule

Removes a direct membership rule from one or more user collections in the Configuration Manager hierarchy.

Syntax

Remove-CMUserCollectionDirectMembershipRule
      -CollectionId <String>
      [-Confirm]
      [-Force]
      -Resource <IResultObject>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMUserCollectionDirectMembershipRule
      -CollectionId <String>
      [-Confirm]
      [-Force]
      -ResourceId <String>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMUserCollectionDirectMembershipRule
      -CollectionId <String>
      [-Confirm]
      [-Force]
      -ResourceName <String>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMUserCollectionDirectMembershipRule
      -CollectionName <String>
      [-Confirm]
      [-Force]
      -ResourceName <String>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMUserCollectionDirectMembershipRule
      -CollectionName <String>
      [-Confirm]
      [-Force]
      -Resource <IResultObject>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMUserCollectionDirectMembershipRule
      -CollectionName <String>
      [-Confirm]
      [-Force]
      -ResourceId <String>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMUserCollectionDirectMembershipRule
      [-Confirm]
      [-Force]
      -InputObject <IResultObject>
      -Resource <IResultObject>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMUserCollectionDirectMembershipRule
      [-Confirm]
      [-Force]
      -InputObject <IResultObject>
      -ResourceId <String>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMUserCollectionDirectMembershipRule
      [-Confirm]
      [-Force]
      -InputObject <IResultObject>
      -ResourceName <String>
      [-WhatIf]
      [<CommonParameters>]

Description

The Remove-CMUserCollectionDirectMembershipRule cmdlet removes a direct rule from the specified collections. You can specify the collections by using their names, IDs, or by specifying an 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 all direct membership rules from a user collection

PS C:\> Remove-CMUserCollectionDirectMembershipRule -CollectionID "CM0001A" -ResourceId "12733"

This command removes all the direct membership rules of the user collection that has the ID CM0001A.

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
-InputObject
Type:IResultObject
Aliases:Collection
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Resource
Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceId
Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceName
Type:String
Position:Named
Default value:None
Accept pipeline input:False
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