New-CMSoftwareMeteringRule

Creates a Configuration Manager software metering rule.

Syntax

New-CMSoftwareMeteringRule
   [-Comment <String>]
   [-Confirm]
   [-DisableWildcardHandling]
   [-FileName <String>]
   [-FileVersion <String>]
   [-ForceWildcardHandling]
   [-LanguageId <Int32>]
   [-OriginalFileName <String>]
   -ProductName <String>
   [-SiteCode <String>]
   [-WhatIf]
   [<CommonParameters>]
New-CMSoftwareMeteringRule [-Confirm] [-DisableWildcardHandling] [-ForceWildcardHandling] -Path 
 [-ProductName ] [-SiteCode ] [-WhatIf] []

Description

The New-CMSoftwareMeteringRule cmdlet creates a Microsoft System Center Configuration Manager software metering rule. A software metering rule specifies a piece of software, along with version information. You can obtain necessary file information from Windows Explorer.

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.

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

Examples

Example 1: Create a software metering rule

PS C:\> New-CMSoftwareMeteringRule -Path "Notepad.exe" -SiteCode "CM1" -FileVersion "6.1.7600.16385" -OriginalFileName "NOTEPAD.EXE" -ProductName "Microsoft Windows Operating System" 
ApplyToChildSites : True
Comment           : 
Enabled           : True
FileName          : Notepad.exe
FileVersion       : 6.1.7600.16385
LanguageID        : 
LastUpdateTime    : 
OriginalFileName  : NOTEPAD.EXE
ProductName       : Microsoft Windows Operating System
RuleID            : 
SecurityKey       : 
SiteCode          : CM1
SourceSite        :

This command creates a software metering rule for the System Center Configuration Manager site named CM1. The command specifies the file name, version, original file name, and product name for the software product.

Required Parameters

-Path

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

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

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

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

Specifies a site code for 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