7 lines
614 B
PowerShell
7 lines
614 B
PowerShell
$powerManagementRef = $wsmanConnectionObject.NewReference("SELECT * FROM CIM_PowerManagementService WHERE Name='Intel(r) AMT Power Management Service'")
|
|
$inputObject = $powerManagementRef.CreateMethodInput("RequestOSPowerSavingStateChange")
|
|
$inputObject.SetProperty("OSPowerSavingState", "2") # '2' = Full Power.
|
|
$computerSystemRef = $wsmanConnectionObject.NewReference("SELECT * FROM CIM_ComputerSystem WHERE Name='ManagedSystem'")
|
|
$inputObject.SetProperty("ManagedElement", $computerSystemRef)
|
|
$outputObject = $powerManagementRef.InvokeMethod($inputObject)
|
|
$returnValue = $outputObject.GetProperty("ReturnValue") |