Remove-CMUserCollectionQueryMembershipRule

Removes a query membership rule from one or more user collection in the Configuration Manager hierarchy.

Syntax

Remove-CMUserCollectionQueryMembershipRule
      -CollectionId <String>
      [-Confirm]
      [-Force]
      -RuleName <String>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMUserCollectionQueryMembershipRule -CollectionName  [-Confirm] [-Force] -RuleName 
 [-WhatIf] []
Remove-CMUserCollectionQueryMembershipRule [-Confirm] [-Force] -InputObject  -RuleName 
 [-WhatIf] []

Description

The Remove-CMUserCollectionQueryMembershipRule cmdlet removes a query rule from the specified user 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 membership rules in Microsoft System Center Configuration Manager, see Introduction to Collections in Configuration Manager on TechNet.

Examples

Example 1: Remove a rule from a collection by using the collection name

PS C:\> Remove-CMUserCollectionQueryMembershipRule -CollectionName "Remote Users" -RuleName "Remote Users by Domain"

This command removes the rule named Remote Users by Domain from the collection named Remote Users.

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