電力不足通知動作 的登錄值 DCSettingIndex電腦HKLM\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546

原則 ID
DCBatteryDischargeAction0_2
適用範圍
電腦設定
支援的作業系統
至少需要 Windows Vista
來源
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
類別
系統 › 電源管理 › 通知設定值

登錄

DCSettingIndex

REG_DWORD電腦
啟用時的值
取決於選項值
元素
電力不足通知動作
選項
項目儲存的值
不執行動作0
睡眠1
休眠2
關機3
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546]

; 選項 (只使用其中一個)
; 不執行動作
"DCSettingIndex"=dword:00000000
; 睡眠
"DCSettingIndex"=dword:00000001
; 休眠
"DCSettingIndex"=dword:00000002
; 關機
"DCSettingIndex"=dword:00000003
CMD
:: 選項 (只使用其中一個)

:: 不執行動作
reg add "HKLM\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546" /v "DCSettingIndex" /t REG_DWORD /d 0 /f
:: 睡眠
reg add "HKLM\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546" /v "DCSettingIndex" /t REG_DWORD /d 1 /f
:: 休眠
reg add "HKLM\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546" /v "DCSettingIndex" /t REG_DWORD /d 2 /f
:: 關機
reg add "HKLM\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546" /v "DCSettingIndex" /t REG_DWORD /d 3 /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546' -Force | Out-Null

# 選項 (只使用其中一個)
# 不執行動作
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546' -Name 'DCSettingIndex' -PropertyType DWord -Value 0 -Force | Out-Null
# 睡眠
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546' -Name 'DCSettingIndex' -PropertyType DWord -Value 1 -Force | Out-Null
# 休眠
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546' -Name 'DCSettingIndex' -PropertyType DWord -Value 2 -Force | Out-Null
# 關機
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\637EA02F-BBCB-4015-8E2C-A1C7B9C0B546' -Name 'DCSettingIndex' -PropertyType DWord -Value 3 -Force | Out-Null