Compartilhar via


Win32_PowerSettingDataIndex class

Represents the setting data index value for a power setting in the system. A power setting data index value instance represents the actual AC or DC value for a given power setting. Two instances of this class are created for each power setting; one represents the AC value and the other represents the DC value. On systems that have only AC power, the DC values will be absent. The InstanceID property indicates whether the setting applies to AC or DC. Power setting values are associated with power plans through the Win32_PowerSettingDataIndexInPlan class. Each power setting is also associated with its power setting definition, represented by the Win32_PowerSettingDefinition class, via the Win32_PowerSettingDefineCapabilities association.

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

Syntax

[Provider("PowerWmiProvider"), Dynamic]
class Win32_PowerSettingDataIndex : CIM_SettingData
{
  string InstanceID;
  uint32 SettingIndexValue;
};

Members

The Win32_PowerSettingDataIndex class has these types of members:

Properties

The Win32_PowerSettingDataIndex class has these properties.

InstanceID

Data type: string

Access type: Read-only

Specifies the unique identifier for the power setting data index instance.

The InstanceID string must be in the following format: "Microsoft:PowerSettingDataIndex\{Plan_GUID}\\{AC|DC\\{DataIndex_GUID}". The {Plan_GUID} portion of the string corresponds to the GUID of the power plan, the {AC|DC} portion corresponds to either the AC or DC value, and the {DataIndex_GUID) portion corresponds to the unique GUID of the power setting data index.

SettingIndexValue

Data type: uint32

Access type: Read/write

Specifies the value for the power setting.

Remarks

Setting a power setting value that is associated with the active power scheme does not automatically make the power setting value take effect on the system. Instead, the Win32_PowerPlan.Activate method must be called to activate the new settings.

Examples

The following PowerShell code example displays the power settings of the local computer.

$powerplan=get-wmiobject -namespace "root\cimv2\power" -class Win32_powerplan | where {$_.IsActive}

$powerSettings = $powerplan.GetRelated("win32_powersettingdataindex") | foreach {
 $powersettingindex = $_;

 $powersettingindex.GetRelated("Win32_powersetting") | select @{Label="Power Setting";Expression={$_.instanceid}},
 @{Label="AC/DC";Expression={$powersettingindex.instanceid.split("\")[2]}},
 @{Label="Summary";Expression={$_.ElementName}},
 @{Label="Description";Expression={$_.description}},
 @{Label="Value";Expression={$powersettingindex.settingindexvalue}}
 }

$powerSettings | ft "AC/DC",Summary,Value -autosize

Requirements

Minimum supported client
Windows 7
Minimum supported server
Windows Server 2008 R2
Namespace
Root\CIMV2\power
MOF
PowerWmiProvider.mof
DLL
PowerWmiProvider.dll