Allow privileged WSL containers
Explanation
This policy controls whether WSL containers can run in privileged mode or with additional Linux capabilities on this machine. When enabled or not configured, users and Windows applications can start privileged containers and request additional Linux capabilities through --cap-add or the WSL container API. When set to 'Disabled', requests to start a privileged container or create a container with additional Linux capabilities are refused for all users and Windows apps. Privileged containers run with elevated Linux capabilities and reduced isolation from the container host.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\WSL- Value name
AllowWSLContainerPrivileged
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
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: WSL/AllowWSLContainerPrivileged
$k = 'HKLM:\Software\Policies\WSL'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowWSLContainerPrivileged' -Value 1 -Type DWordDisable
# Disable: WSL/AllowWSLContainerPrivileged
$k = 'HKLM:\Software\Policies\WSL'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowWSLContainerPrivileged' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WSL/AllowWSLContainerPrivileged
$k = 'HKLM:\Software\Policies\WSL'
Remove-ItemProperty -Path $k -Name 'AllowWSLContainerPrivileged' -ErrorAction SilentlyContinueApplication
Windows Subsystem for Linux (WSL) (Microsoft) — November 2026 templates
Official templates downloaded on November 12, 2026.