Remove-CMSoftwareMeteringRule

Removes Configuration Manager software metering rules.

Syntax

Remove-CMSoftwareMeteringRule
      [-Force]
      -InputObject <IResultObject>
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMSoftwareMeteringRule
      [-Force]
      -Id <String>
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMSoftwareMeteringRule
      [-Force]
      -ProductName <String>
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-CMSoftwareMeteringRule cmdlet removes one or more software metering rules from Configuration Manager.

Software metering monitors and collects software usage data from Configuration Manager clients, such as when clients began using a particular software program and how long users have worked with that software. You can create software metering rules that specify which software to monitor.

You can specify rules to disable by ID or by product name, or use the Get-CMSoftwareMeteringRule cmdlet. You can use the Disable-CMSoftwareMeteringRule to temporarily suspend a rule.

For more information about software metering in Configuration Manager, see Introduction to Software Metering in Configuration Manager.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Remove rules for a product

PS XYZ:\> Remove-CMSoftwareMeteringRule -ProductName "Accounting Package"
Remove
Are you sure you wish to remove SoftwareMeteringRule: RuleID=16777220?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y

Remove
Are you sure you wish to remove SoftwareMeteringRule: RuleID=16777221?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y

This command removes any software metering rules for a product named Accounting Package. In this example, there are two rules for that product. The command does not include the Force parameter, so the cmdlet prompts for confirmation for both rules.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-Force

Forces the command to run without asking for user confirmation.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

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

-Id

Specifies an array of IDs for software metering rules.

Type:String
Aliases:RuleId
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Specifies a software metering rule object. To obtain a software metering rule object, use the Get-CMSoftwareMeteringRule cmdlet.

Type:IResultObject
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ProductName

Specifies a name for a product that a rule meters.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:True

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

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

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object