Set-CMSoftwareMeteringRule
Set-CMSoftwareMeteringRule
Changes properties and security scopes for Configuration Manager software metering rules.
Syntax
Parameter Set: SetById
Set-CMSoftwareMeteringRule -Id <String[]> [-Comment <String> ] [-FileVersion <String> ] [-LanguageId <Int32> ] [-NewProductName <String> ] [-OriginalFileName <String> ] [-Path <String> ] [-SiteCode <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetByName
Set-CMSoftwareMeteringRule -ProductName <String> [-Comment <String> ] [-FileVersion <String> ] [-LanguageId <Int32> ] [-NewProductName <String> ] [-OriginalFileName <String> ] [-Path <String> ] [-SiteCode <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetByValueMandatory
Set-CMSoftwareMeteringRule -InputObject <IResultObject> [-Comment <String> ] [-FileVersion <String> ] [-LanguageId <Int32> ] [-NewProductName <String> ] [-OriginalFileName <String> ] [-Path <String> ] [-SiteCode <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetSecurityScopeById
Set-CMSoftwareMeteringRule -Id <String[]> -SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} -SecurityScopeName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetSecurityScopeByName
Set-CMSoftwareMeteringRule -ProductName <String> -SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} -SecurityScopeName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetSecurityScopeByValue
Set-CMSoftwareMeteringRule -InputObject <IResultObject> -SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} -SecurityScopeName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-CMSoftwareMeteringRule cmdlet changes properties for software metering rules in Microsoft System Center 2012 SP1 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 2012 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 2012 Configuration Manager, see Introduction to Software Metering in Configuration Manager (https://go.microsoft.com/fwlink/?LinkId=268432) on TechNet. For more information about security scopes, see Planning for Security in Configuration Manager (https://go.microsoft.com/fwlink/?LinkId=268426).
Parameters
-Comment<String>
Specifies a comment for a software metering rule.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-FileVersion<String>
Specifies a version of the software that a rule meters.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Id<String[]>
Specifies an array of IDs for software metering rules.
Aliases |
RuleId |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-InputObject<IResultObject>
Specifies a software metering rule object. To obtain a software metering rule object, use the Get-CMSoftwareMeteringRule cmdlet.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-LanguageId<Int32>
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 https://go.microsoft.com/fwlink/?LinkId=262651.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-NewProductName<String>
Specifies a new name for the software that a rule meters.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-OriginalFileName<String>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Path<String>
Specifies a file path of the software that a rule meters.
Aliases |
FileName |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-ProductName<String>
Specifies a name for a product that a rule meters.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SecurityScopeAction<SecurityScopeActionType>
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SecurityScopeName<String>
Specifies the name of a security scope. A security scope name can be Default or the name of a custom security scope.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SiteCode<String>
Specifies a site code of a Configuration Manager site.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
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 is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Change locale for rules for a product
This command sets the locale ID for rules that include the product name Accounting Package.
PS C:\> Set-CMSoftwareMeteringRule -ProductName "Accounting Package" -LanguageID 1036
Example 2: Add a security scope to rules for a product
This command adds the security scope called Scope05 to rules for the product name Accounting Package.
PS C:\> Set-CMSoftwareMeteringRule -ProductName "Accounting Package" -SecurityScopeAction AddMembership -SecurityScopeName "Scope05"