Autoriser le partage du presse-papiers avec Bac à sable Windows
Allow clipboard sharing with Windows Sandbox
Explication
Ce paramètre de stratégie active ou désactive le partage du Presse-papiers avec le bac à sable (sandbox).
Si vous activez ce paramètre de stratégie, le copier-coller entre l’hôte et Bac à sable Windows est autorisé.
Si vous désactivez ce paramètre de stratégie, le copier-coller dans et hors du bac à sable (sandbox) est restreint.
Si vous ne configurez pas ce paramètre de stratégie, le partage du Presse-papiers est activé.
This policy setting enables or disables clipboard sharing with the sandbox.
If you enable this policy setting, copy and paste between the host and Windows Sandbox are permitted.
If you disable this policy setting, copy and paste in and out of Sandbox will be restricted.
If you do not configure this policy setting, clipboard sharing will be enabled.
Registre
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Sandbox- Nom de la valeur
AllowClipboardRedirection
| État | Valeur écrite |
|---|---|
| Activé | REG_DWORD = 1 |
| Désactivé | REG_DWORD = 0 |
PowerShell
Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.
Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.
Activer
# Activer : WindowsSandbox/AllowClipboardRedirection
$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 'AllowClipboardRedirection' -Value 1 -Type DWordDésactiver
# Désactiver : WindowsSandbox/AllowClipboardRedirection
$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 'AllowClipboardRedirection' -Value 0 -Type DWordRevenir à « Non configuré »
# Revenir à « Non configuré » : WindowsSandbox/AllowClipboardRedirection
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Sandbox'
Remove-ItemProperty -Path $k -Name 'AllowClipboardRedirection' -ErrorAction SilentlyContinue