Compartir a través de


SetPowerState method of the CIM_UnitaryComputerSystem class

SetPowerState defines the desired power state of a ComputerSystem and its running OperatingSystem, and when the system should be put into that state. The PowerState parameter is specified as one of the valid integer values defined for the property, PowerState. The Time parameter (for all state changes but 5, "Power Cycle") indicates when the power state should be set, either as a regular date-time value or as an interval value (where the interval begins when the method invocation is received). When the PowerState parameter is equal to 5, "Power Cycle", the Time parameter indicates when the system should power on again. Power off is immediate.

Syntax

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

Parameters

PowerState [in]

TBD

Time [in]

TBD

Return value

Returns 0 if successful, 1 if the specified PowerState and Time values are not supported, or some other 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_UnitaryComputerSystem