Partager via


SetPowerState method of the CIM_LogicalDevice class

Defines the desired power state for a LogicalDevice and when a Device should be put into that state. Power off is immediate.

Syntax

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

Parameters

PowerState [in]

Specifies the desired power state.

Full Power (1)

Power Save - Low Power Mode (2)

Power Save - Standby (3)

Power Save - Other (4)

Power Cycle (5)

Power Off (6)

Time [in]

If the PowerState parameter is 5 (Power Cycle), this parameter indicates when the device should be powered on again.

Return value

Returns 0 if successful, 1 if the values passed in the PowerState and Time parameters are not supported, or another value if any other error occurred.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008
Namespace
Root\MSCluster
MOF
ClusWMI.mof
DLL
ClusWMI.dll

See also

CIM_LogicalDevice