Turn off hybrid sleep (on battery)
Désactiver la veille hybride (sur batterie)
Explanation
This policy setting allows you to turn off hybrid sleep.
If you enable this policy setting, a hiberfile is not generated when the system transitions to sleep (Stand By).
If you disable or do not configure this policy setting, users control this setting.
Ce paramètre de stratégie permet de désactiver la veille hybride.
Si vous activez ce paramètre de stratégie, aucun fichier de veille prolongée n’est généré lorsque le système passe en veille.
Si vous désactivez ou ne configurez pas ce paramètre de stratégie, les utilisateurs contrôlent ce paramètre.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Power\PowerSettings\94ac6d29-73ce-41a6-809f-6363ba21b47e- Value name
DCSettingIndex
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 0 |
| Disabled | REG_DWORD = 1 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: Power/DCStandbyWithHiberfileEnable_2
$k = 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\94ac6d29-73ce-41a6-809f-6363ba21b47e'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DCSettingIndex' -Value 0 -Type DWordDisable
# Disable: Power/DCStandbyWithHiberfileEnable_2
$k = 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\94ac6d29-73ce-41a6-809f-6363ba21b47e'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DCSettingIndex' -Value 1 -Type DWordRevert to "Not configured"
# Revert to "Not configured": Power/DCStandbyWithHiberfileEnable_2
$k = 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\94ac6d29-73ce-41a6-809f-6363ba21b47e'
Remove-ItemProperty -Path $k -Name 'DCSettingIndex' -ErrorAction SilentlyContinue