Open in the explorer

Allow WSL container

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Subsystem for Linux › WSL container
Supported on
SUPPORTED_Windows10
ADMX file
WSL.admx
Internal name
WSL/AllowWSLContainer

Explanation

This policy controls whether WSL container can be used on this machine. When enabled or not configured, users and Windows applications can run Linux containers via WSL. When set to disabled, WSL container is blocked for all users and Windows apps cannot run Linux containers. Warning: Setting this to 'Disabled' can break Windows apps that depend on Linux containers.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\WSL
Value name
AllowWSLContainer
StateValue written
EnabledREG_DWORD = 1
DisabledREG_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/AllowWSLContainer
$k = 'HKLM:\Software\Policies\WSL'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowWSLContainer' -Value 1 -Type DWord

Disable

# Disable: WSL/AllowWSLContainer
$k = 'HKLM:\Software\Policies\WSL'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowWSLContainer' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": WSL/AllowWSLContainer
$k = 'HKLM:\Software\Policies\WSL'
Remove-ItemProperty -Path $k -Name 'AllowWSLContainer' -ErrorAction SilentlyContinue

Application

Windows Subsystem for Linux (WSL) (Microsoft) — November 2026 templates

Official templates downloaded on November 12, 2026.