Compartir a través de


SetPowerState method of the CIM_Sensor class

Sets the power state of the Device. The use of this method has been deprecated. Instead, use the SetPowerState method in the associated PowerManagementService class.

Syntax

uint32 SetPowerState(
  [in] uint16   PowerState,
  [in] datetime Time
);

Parameters

PowerState [in]

The power state to set.

This parameter can contain one of the following values:

1

Full Power

2

Power Save - Low Power Mode

3

Power Save - Standby

4

Power Save - Other

5

Power Cycle

6

Power Off

Time [in]

Indicates when to set the power state, either as a regular datetimevalue or as an interval value (where the interval begins when the method invocation is received).

Return value

A return code that indicates whether the operation completed successfully.

0

The operation completed successfully.

1

The operation was not completed because it is not supported.

2 ...

The operation was not completed because an error occurred.

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
Root\Hardware
MOF
IpmiPrv.mof
DLL
IpmiPrv.dll

See also

CIM_Sensor