Automatically grant sites permission to connect to USB serial devices
Cette stratégie n'a pas de traduction française dans les modèles de l'éditeur ; le texte original est en anglais.
Explication
Setting the policy lets you list sites that are automatically granted permission to access USB serial devices with vendor and product IDs that match the vendor_id and product_id fields.
Optionally you can omit the product_id field. This enables site access to the vendor's devices. When you provide a product ID, then you give the site access to a specific device from the vendor but not all devices.
The URLs must be valid, or the policy is ignored. Only the origin (scheme, host, and port) of the URL is considered.
This policy overrides 'DefaultSerialGuardSetting' (Control use of the Serial API), 'SerialAskForUrls' (Allow the Serial API on specific sites), 'SerialBlockedForUrls' (Block the Serial API on specific sites), and the user's preferences.
This policy only affects access to USB devices through the Web Serial API. To grant access to USB devices through the WebUSB API, see the 'WebUsbAllowDevicesForUrls' (Grant access to specific sites to connect to specific USB devices) policy.
Example value:
[
{
"devices": [
{
"product_id": 5678,
"vendor_id": 1234
}
],
"urls": [
"https://specific-device.example.com"
]
},
{
"devices": [
{
"vendor_id": 1234
}
],
"urls": [
"https://all-vendor-devices.example.com"
]
}
]
Registre
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\EdgeHKEY_CURRENT_USER\Software\Policies\Microsoft\Edge- Nom de la valeur
- non défini dans l'ADMX
Valeurs d'activation / désactivation : non défini dans l'ADMX (voir les options ci-dessous).
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.
Ordinateur (HKLM)
Activer
# Activer : msedge/SerialAllowUsbDevicesForUrls
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Automatically grant sites permission to connect to USB serial devices
Set-ItemProperty -Path $k -Name 'SerialAllowUsbDevicesForUrls' -Value '<valeur>' -Type StringDésactiver
# Désactiver : msedge/SerialAllowUsbDevicesForUrls
# Aucune valeur n'est écrite à l'état « Désactivé » (rien de défini dans l'ADMX)Revenir à « Non configuré »
# Revenir à « Non configuré » : msedge/SerialAllowUsbDevicesForUrls
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
Remove-ItemProperty -Path $k -Name 'SerialAllowUsbDevicesForUrls' -ErrorAction SilentlyContinueUtilisateur (HKCU)
Activer
Désactiver
Revenir à « Non configuré »
Options (1)
| Libellé | Contrôle | Valeur de registre | Type REG | Contraintes / détails |
|---|---|---|---|---|
| Automatically grant sites permission to connect to USB serial devicesSerialAllowUsbDevicesForUrls | Zone de textetext | SerialAllowUsbDevicesForUrls | REG_SZ | Longueur max : 1000000 |
Application
Microsoft Edge (+ Edge Update, WebView2) (Microsoft) — modèles de novembre 2026
Modèles officiels téléchargés le 12 novembre 2026.