Command line output:
C:\powercfg -availablesleepstates
The following sleep states are available on this system:
Standby (S3)
Hibernate
Hybrid Sleep
Fast Startup
The following sleep states are not available on this system:
Standby (S1)
The system firmware does not support this standby state.
Standby (S2)
The system firmware does not support this standby state.
Standby (S0 Low Power Idle)
The system firmware does not support this standby state.
powershell script:
$info = (powercfg /a | Select-String -Pattern "sleep states are available" -context 4) | select -Last 4
$items = $info -split ","
$ourObject = New-Object -TypeName psobject
$ourObject | Add-Member -MemberType NoteProperty -Name PCFG0bj -Value $items -Force
$ourObject | fl
Output:
PCFG0bj : {> The following sleep states are available on this system:
Standby (S3)
Hibernate
Hybrid Sleep
Fast Startup}
Here is a PowerShell function that exposes SYSTEM_POWER_CAPABILITIES directly, as @Persistent13 suggested. The struct has been updated to include new variables, such as AoAc to show if Modern Standby (S0) is supported. An updated definition for SYSTEM_POWER_CAPABILITIES was more difficult to find than I thought, as the Microsoft KB incorrectly displays SYSTEM_BATTERY_STATE. I managed to find some alternative resources, which are linked in the TypeDef.
Function:
Usage:
I'm not sure BatteryScale is accurate, as it returns all 0s for me. All the PowerSystemUnspecified values are a bit concerning too. But the S0-5 sleep states all seem to report correctly.