Disallow standby sleep states (S1-S3) when starting from a Windows to Go workspace
Interdire les états de veille mise en attente (S1-S3) lors du démarrage à partir d’un espace de travail Windows sur clé USB
Explanation
Specifies whether the PC can use standby sleep states (S1-S3) when starting from a Windows To Go workspace.
If you enable this setting, Windows, when started from a Windows To Go workspace, can't use standby states to make the PC sleep.
If you disable or don't configure this setting, Windows, when started from a Windows To Go workspace, can use standby states to make the PC sleep.
Spécifie si l’ordinateur peut utiliser les états de veille mise en attente (S1-S3) en cas de démarrage à partir d’un espace de travail Windows sur clé USB.
Si vous activez ce paramètre de stratégie, Windows, s’il est démarré à partir d’un espace de travail Windows sur clé USB, ne peut pas utiliser les états de mise en attente pour mettre l’ordinateur en veille.
Si vous désactivez ou ne configurez pas ce paramètre de stratégie, Windows, s’il est démarré à partir d’un espace de travail Windows sur clé USB, peut utiliser les états de mise en attente pour mettre l’ordinateur en veille.
Registry
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Policies\Microsoft\PortableOperatingSystem- Value name
Sleep
| 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: ExternalBoot/PortableOperatingSystem_Sleep
$k = 'HKLM:\System\CurrentControlSet\Policies\Microsoft\PortableOperatingSystem'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Sleep' -Value 0 -Type DWordDisable
# Disable: ExternalBoot/PortableOperatingSystem_Sleep
$k = 'HKLM:\System\CurrentControlSet\Policies\Microsoft\PortableOperatingSystem'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Sleep' -Value 1 -Type DWordRevert to "Not configured"
# Revert to "Not configured": ExternalBoot/PortableOperatingSystem_Sleep
$k = 'HKLM:\System\CurrentControlSet\Policies\Microsoft\PortableOperatingSystem'
Remove-ItemProperty -Path $k -Name 'Sleep' -ErrorAction SilentlyContinue