Set-CMSoftwareMeteringRule
Changes properties and security scopes for Configuration Manager software metering rules.
Syntax
Set-CMSoftwareMeteringRule
[-Comment <String>]
[-FileName <String>]
[-FileVersion <String>]
-InputObject <IResultObject>
[-LanguageId <Int32>]
[-NewProductName <String>]
[-OriginalFileName <String>]
[-PassThru]
[-Path <String>]
[-SiteCode <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-CMSoftwareMeteringRule
[-Comment <String>]
[-FileName <String>]
[-FileVersion <String>]
[-LanguageId <Int32>]
[-NewProductName <String>]
[-OriginalFileName <String>]
[-PassThru]
[-Path <String>]
-ProductName <String>
[-SiteCode <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-CMSoftwareMeteringRule
[-Comment <String>]
[-FileName <String>]
[-FileVersion <String>]
-Id <String>
[-LanguageId <Int32>]
[-NewProductName <String>]
[-OriginalFileName <String>]
[-PassThru]
[-Path <String>]
[-SiteCode <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-CMSoftwareMeteringRule cmdlet changes properties for software metering rules in 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 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 Configuration Manager, see Introduction to Software Metering in Configuration Manager. For more information about security scopes, see Planning for Security 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: Change locale for rules for a product
PS XYZ:\> 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 XYZ:\> 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.
Parameters
-Comment
Specifies a comment for a software metering rule.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-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 |
-FileName
Specifies the filename of the software that a rule meters.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FileVersion
Specifies a version of the software that a rule meters.
Type: | String |
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 |
-LanguageId
Specifies a LocaleID of the software that a rule meters. For more information and a list of locale identifiers, see Appendix A: Product Behavior.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NewProductName
Specifies a new name for the software that a rule meters.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Add this parameter to return an object that represents the item with which you're working. By default, this cmdlet may not generate any output.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Path
Specifies a file path of the software that a rule meters.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
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: | False |
-SiteCode
Specifies a site code of a Configuration Manager site.
Type: | String |
Position: | Named |
Default value: | None |
Required: | 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 |
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