PowerShell PowerShellからWin32 GetSystemPowerStatusを呼ぶ ― 電源状態を直接観察する PowerShellからWin32 APIをP/Invokeし、AC電源とバッテリー状態を読み取り専用で観察します。 2026.09.16 PowerShell