Set-CMSoftwareMeteringRule

Changes properties and security scopes for Configuration Manager software metering rules.

Syntax

Set-CMSoftwareMeteringRule
   [-Comment <String>]
   [-Confirm]
   [-DisableWildcardHandling]
   [-FileName <String>]
   [-FileVersion <String>]
   [-ForceWildcardHandling]
   -Id <String>
   [-LanguageId <Int32>]
   [-NewProductName <String>]
   [-OriginalFileName <String>]
   [-PassThru]
   [-Path <String>]
   [-SiteCode <String>]
   [-WhatIf]
   [<CommonParameters>]
Set-CMSoftwareMeteringRule [-Comment ] [-Confirm] [-DisableWildcardHandling] [-FileName ]
 [-FileVersion ] [-ForceWildcardHandling] -InputObject  [-LanguageId ]
 [-NewProductName ] [-OriginalFileName ] [-PassThru] [-Path ] [-SiteCode ]
 [-WhatIf] []
Set-CMSoftwareMeteringRule [-Comment ] [-Confirm] [-DisableWildcardHandling] [-FileName ]
 [-FileVersion ] [-ForceWildcardHandling] [-LanguageId ] [-NewProductName ]
 [-OriginalFileName ] [-PassThru] [-Path ] -ProductName  [-SiteCode ] [-WhatIf]
 []

Description

The Set-CMSoftwareMeteringRule cmdlet changes properties for software metering rules in Microsoft System Center Configuration Manager and adds or removes security scopes for software metering rules. Every rule must have at least one security scope.

Software metering monitors and collects software usage data from System Center 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.

To change rule properties, you can specify rules to change by ID or by product name, or use the Get-CMSoftwareMeteringRule cmdlet. Likewise, you can change security scope for rules for specified ID, product name, or by using Get-CMSoftwareMeteringRule.

For more information about software metering in System Center Configuration Manager, see Introduction to Software Metering in Configuration Manager on TechNet. For more information about security scopes, see Planning for Security in Configuration Manager.

Examples

Example 1: Change locale for rules for a product

PS C:\> Set-CMSoftwareMeteringRule -ProductName "Accounting Package" -LanguageID 1036

This command sets the locale ID for rules that include the product name Accounting Package.

Example 2: Add a security scope to rules for a product

PS C:\> Set-CMSoftwareMeteringRule -ProductName "Accounting Package" -SecurityScopeAction AddMembership -SecurityScopeName "Scope05"

This command adds the security scope called Scope05 to rules for the product name Accounting Package.

Required Parameters

-Id

Specifies an array of IDs for software metering rules.

Type:String
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-SoftwareMeteringRule cmdlet.

Type:IResultObject
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
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Comment

Specifies a comment for a software metering rule.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-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
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

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

Specifies the filename of the software that a rule meters.

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

Specifies a version of the software that a rule meters.

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

Indicates that wildcard handling is enabled.

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

Specifies a LocaleID of the software that a rule meters. For more information and a list of locale identifiers, see the Locale IDs Assigned by Microsoft topic at http://go.microsoft.com/fwlink/?LinkId=262651.

Type:Int32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewProductName

Specifies a new name for the software that a rule meters.

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

Specifies an original file name of the software that a rule meters. This parameter can differ from the FileName parameter if a user changed the name.

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

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

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

Specifies a file path of the software that a rule meters.

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

Specifies a site code of a Configuration Manager site.

Type:String
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