Open in the explorer

Prompt for password on resume from hibernate/suspend

Demande le mot de passe lors de la reprise à partir de la mise en veille prolongée/suspension

Type
User
GPO path
User Configuration › Policies › Administrative Templates › System › Power Management FR: Configuration utilisateur › Stratégies › Modèles d'administration › Système › Gestion de l’alimentation
Supported on
Windows Server 2003, Windows XP, and Windows 2000 only FR: Windows Server 2003, Windows XP et Windows 2000 uniquement
ADMX file
Power.admx
Internal name
Power/PW_PromptPasswordOnResume

Explanation

This policy setting allows you to configure client computers to lock and prompt for a password when resuming from a hibernate or suspend state.

If you enable this policy setting, the client computer is locked and prompted for a password when it is resumed from a suspend or hibernate state.

If you disable or do not configure this policy setting, users control if their computer is automatically locked or not after performing a resume operation.

French text from Windows 11 26H2

Ce paramètre de stratégie vous permet de configurer les ordinateurs clients de façon à se verrouiller et à afficher une invite de mot de passe lors de la sortie du mode Veille prolongée ou de l’état Suspendu.

Si vous activez ce paramètre de stratégie, l’ordinateur client est verrouillé et affiche une invite de mot de passe lorsqu’il sort du mode Veille prolongée ou de l’état Suspendu.

Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, les utilisateurs contrôlent si leur ordinateur est automatiquement verrouillé ou non à la reprise du système.

Registry

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Power
Value name
PromptPasswordOnResume
StateValue written
Enablednot defined in the ADMX
Disablednot defined in the ADMX

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.

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/PW_PromptPasswordOnResume
$k = 'HKCU:\Software\Policies\Microsoft\Windows\System\Power'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'PromptPasswordOnResume' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)

Disable

# Disable: Power/PW_PromptPasswordOnResume
$k = 'HKCU:\Software\Policies\Microsoft\Windows\System\Power'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'PromptPasswordOnResume' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": Power/PW_PromptPasswordOnResume
$k = 'HKCU:\Software\Policies\Microsoft\Windows\System\Power'
Remove-ItemProperty -Path $k -Name 'PromptPasswordOnResume' -ErrorAction SilentlyContinue

Availability