Remove-CMDeviceCollectionQueryMembershipRule

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

Syntax

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

Description

The Remove-CMDeviceCollectionQueryMembershipRule cmdlet removes a query rule from the specified device collections. You can specify the device collections by name, ID, or an input object that represents the collections.

For more information about membership rules, see Introduction to Collections in Configuration Manager on TechNet.

Examples

Example 1: Remove the query membership rules for a device collection

PS C:\> Remove-CMDeviceCollectionQueryMembershipRule -CollectionName "Mobile Windows 7 Devices" -RuleName "TPM Information"

This command removes the query membership rule named TPM Information from the device collection named Mobile Windows 7 Devices.

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

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
-RuleName
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