Share via


SetPowerState method of the Sensor class

Note

This method is deprecated. Instead we recommend that you use the SetPowerState property of the CIM_PowerManagementService class.

Sets the power state of the sensor.

This method is inherited from CIM_LogicalDevice.

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

IPMI Provider

Sensor