Open in the explorer

Allow vGPU sharing for Windows Sandbox

Autoriser le partage vGPU pour Bac à sable Windows

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Windows Sandbox FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Bac à sable Windows
Supported on
At least Windows 11 Pro, Enterprise, or Education with Windows Sandbox FR: Au moins Windows 11 Professionnel, Enterprise ou Education avec Bac à sable Windows
ADMX file
WindowsSandbox.admx
Internal name
WindowsSandbox/AllowVGPU

Explanation

This policy setting is to enable or disable the virtualized GPU.

If you enable this policy setting, vGPU will be supported in the Windows Sandbox.

If you disable this policy setting, Windows Sandbox will use software rendering, which can be slower than virtualized GPU.

If you do not configure this policy setting, vGPU will be enabled.

Note that enabling virtualized GPU can potentially increase the attack surface of the sandbox.

French text from Windows 11 26H2

Ce paramètre de stratégie consiste à activer ou désactiver le GPU virtualisé.

Si vous activez ce paramètre de stratégie, vGPU sera pris en charge dans Bac à sable Windows.

Si vous désactivez ce paramètre de stratégie, Bac à sable Windows utilisera le rendu logiciel, qui peut être plus lent que le GPU virtualisé.

Si vous ne configurez pas ce paramètre de stratégie, vGPU sera activé.

Notez que l'activation du GPU virtualisé peut potentiellement augmenter la surface d'attaque du bac à sable.

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Sandbox
Value name
AllowVGPU
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: WindowsSandbox/AllowVGPU
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Sandbox'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowVGPU' -Value 1 -Type DWord

Disable

# Disable: WindowsSandbox/AllowVGPU
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Sandbox'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowVGPU' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": WindowsSandbox/AllowVGPU
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Sandbox'
Remove-ItemProperty -Path $k -Name 'AllowVGPU' -ErrorAction SilentlyContinue

Availability

Windows 10

— 22H2— 21H2— 21H1— 20H2— 2004— 1909— 1903— 1809— 1803— 1709— 1703— 1607— 1511— 1507

Windows Server