Skip to content

Latest commit

 

History

History
200 lines (149 loc) · 5.5 KB

Enable-CMSoftwareMeteringRule.md

File metadata and controls

200 lines (149 loc) · 5.5 KB
description external help file Module Name ms.date schema title
Enables Configuration Manager software metering rules.
AdminUI.PS.dll-Help.xml
ConfigurationManager
05/01/2019
2.0.0
Enable-CMSoftwareMeteringRule

Enable-CMSoftwareMeteringRule

SYNOPSIS

Enables Configuration Manager software metering rules.

SYNTAX

SearchByIdMandatory (Default)

Enable-CMSoftwareMeteringRule -Id <String> [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf]
 [-Confirm] [<CommonParameters>]

SearchByValueMandatory

Enable-CMSoftwareMeteringRule -InputObject <IResultObject> [-DisableWildcardHandling] [-ForceWildcardHandling]
 [-WhatIf] [-Confirm] [<CommonParameters>]

SearchByNameMandatory

Enable-CMSoftwareMeteringRule -ProductName <String> [-DisableWildcardHandling] [-ForceWildcardHandling]
 [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

The Enable-CMSoftwareMeteringRule cmdlet enables one or more software metering rules in Configuration Manager. You can enable a rule that you previously disabled by using the Disable-CMSoftwareMeteringRule cmdlet. When Configuration Manager automatically creates software metering rules, it creates them as disabled.

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 that enable software metering rules by ID or by product name, or by using the Get-CMSoftwareMeteringRule cmdlet.

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: Enable rules for a specific product

PS XYZ:\>Enable-CMSoftwareMeteringRule -ProductName "Accounting Package"

This command enables software metering rules for a product named Accounting Package. There may be more than one rule. If you previously disabled some rules for this product, but not all, the cmdlet does not inform you that some rules were already enabled.

Example 2: Enable a specific rule

PS XYZ:\>Enable-CMSoftwareMeteringRule -Id "16777229"

This command enables a software metering rule that has the specified ID.

PARAMETERS

-DisableWildcardHandling

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
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
Parameter Sets: (All)
Aliases:

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

-Id

Specifies an array of IDs for software metering rules.

Type: String
Parameter Sets: SearchByIdMandatory
Aliases: RuleId

Required: True
Position: Named
Default value: None
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
Parameter Sets: SearchByValueMandatory
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProductName

Specifies a name for a product that a rule meters.

Type: String
Parameter Sets: SearchByNameMandatory
Aliases:

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-WhatIf

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

OUTPUTS

System.Object

NOTES

RELATED LINKS

Disable-CMSoftwareMeteringRule

Get-CMSoftwareMeteringRule

New-CMSoftwareMeteringRule

Remove-CMSoftwareMeteringRule

Set-CMSoftwareMeteringRule