Allow audio input in Windows Sandbox
Autoriser l'entrée audio dans Bac à sable Windows
Explanation
This policy setting enables or disables audio input to the Sandbox.
If you enable this policy setting, Windows Sandbox will be able to receive audio input from the user. Applications using a microphone may require this setting.
If you disable this policy setting, Windows Sandbox will not be able to receive audio input from the user. Applications using a microphone may not function properly with this setting.
If you do not configure this policy setting, audio input will be enabled.
Note that there may be security implications of exposing host audio input to the container.
Ce paramètre de stratégie active ou désactive l'entrée audio vers la Sandbox.
Si vous activez ce paramètre de stratégie, Bac à sable Windows pourra recevoir l'entrée audio de l'utilisateur. Les applications utilisant un microphone peuvent nécessiter ce réglage.
Si vous désactivez ce paramètre de stratégie, Bac à sable Windows ne pourra pas recevoir d'entrée audio de l'utilisateur. Les applications utilisant un microphone peuvent ne pas fonctionner correctement avec ce paramètre.
Si vous ne configurez pas ce paramètre de stratégie, l'entrée audio sera activée.
Notez que l'exposition de l'entrée audio de l'hôte au conteneur peut avoir des implications sur la sécurité.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Sandbox- Value name
AllowAudioInput
| 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: WindowsSandbox/AllowAudioInput
$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 'AllowAudioInput' -Value 1 -Type DWordDisable
# Disable: WindowsSandbox/AllowAudioInput
$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 'AllowAudioInput' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WindowsSandbox/AllowAudioInput
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Sandbox'
Remove-ItemProperty -Path $k -Name 'AllowAudioInput' -ErrorAction SilentlyContinue