The SMS_MeteredProductRule Windows Management Instrumentation (WMI) class is an SMS Provider server class, in System Center 2012 Configuration Manager, that represents the rules that describe which files to meter.

The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties.

Class SMS_MeteredProductRule : SMS_BaseClass
{
	Boolean ApplyToChildSites;
	String Comment;
	Boolean Enabled;
	String FileName;
	String FileVersion;
	UInt32 LanguageID;
	DateTime LastUpdateTime;
	String OriginalFileName;
	String ProductName;
	UInt32 RuleID;
	String SecurityKey;
	String SiteCode;
	String SourceSite;
};

Methods

The SMS_MeteredProductRule class does not define any methods.

Properties

ApplyToChildSites

Data type: BooleanAccess type: Read/WriteQualifiers: Nonetrue (default) if the rule is applied to child sites.
Comment

Data type: StringAccess type: Read/WriteQualifiers: NoneComment describing the rule.
Enabled

Data type: BooleanAccess type: Read/WriteQualifiers: Nonetrue if the rule is enabled. Data is only collected by the client if the rule is enabled.
FileName

Data type: StringAccess type: Read/WriteQualifiers: NoneName of the file to be metered. This property is used for matching.
FileVersion

Data type: StringAccess type: Read/WriteQualifiers: NoneVersion of the file being metered. This property is used for matching and matches to the FileVersion property stored in the file version information. It can contain wildcards, such as * (match multiple characters) and ? (match a single character). An empty FileVersion property only matches to those executable files that have no version.
LanguageID

Data type: UInt32Access type: Read/WriteQualifiers: [Subtype("Locale Id")]Language ID of the rule being metered. This property matches the Language property stored in the file version information. If it is set to 65535, it matches any language.
LastUpdateTime

Data type: DateTimeAccess type: Read/WriteQualifiers: NoneLast time the rule definition was changed.
OriginalFileName

Data type: StringAccess type: Read/WriteQualifiers: NoneOriginal file name. This property is used for matching and matches the OriginalFileName property stored in the file version information. Because FileName is the Resource Explorer name of the file and might be changed by users, OriginalFileName is used to ensure that the file is metered.
ProductName

Data type: StringAccess type: Read/WriteQualifiers: NoneName of the product being metered. This is the display name of the rule and is not used in matching.
RuleID

Data type: UInt32Access type: Read/WriteQualifiers: [key]ID for the rule.
SecurityKey

Data type: StringAccess type: Read/WriteQualifiers: NoneSecurity key for the rule.
SiteCode

Data type: StringAccess type: Read/WriteQualifiers: NoneSite code of the site on which the rule runs. The rule applies to clients of this site and to the clients of child sites if ApplyToChildSites is set to true.
SourceSite

Data type: StringAccess type: Read/WriteQualifiers: NoneSite where the rule was created.

Remarks

Class qualifiers for this class include:

  • Secured

For more information about both the class qualifiers and the property qualifiers included in the Properties section, see Configuration Manager Class and Property Qualifiers.

Software metering rules instruct the Software Metering Agent which processes to monitor on the client. Your application creates a new rule by creating an instance of this class. The following properties of this class have to be provided:

  • ProductName

  • FileName

  • OriginalFileName

  • FileVersion

  • LanguageID

  • SiteCode

  • ApplyToChildSites

  • Enabled

The Comment property is optional. OriginalFileName can be used instead of FileName, both can be supplied, or FileName only can be supplied. If either the FileName value or the OriginalFileName value matches the file, the file is metered.

No other properties should be supplied.

Requirements

Runtime Requirements

Development Requirements

See Also