Open in the explorer

Prevent installation of devices that match any of these device instance IDs

Empêcher l’installation de périphériques correspondant à l’un de ces ID d’instance de périphérique

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › System › Device Installation › Device Installation Restrictions FR: Configuration ordinateur › Stratégies › Modèles d'administration › Système › Installation de périphériques › Restrictions d’installation de périphériques
Supported on
At least Windows Server 2016, Windows 10 Version 1909 FR: Windows Server 2016, Windows 10 version 1909 ou versions supérieures
ADMX file
DeviceInstallation.admx
Internal name
DeviceInstallation/DeviceInstall_Instance_IDs_Deny

Explanation

This policy setting allows you to specify a list of Plug and Play device instance IDs for devices that Windows is prevented from installing. This policy setting takes precedence over any other policy setting that allows Windows to install a device.

If you enable this policy setting, Windows is prevented from installing a device whose device instance ID appears in the list you create. If you enable this policy setting on a remote desktop server, the policy setting affects redirection of the specified devices from a remote desktop client to the remote desktop server.

If you disable or do not configure this policy setting, devices can be installed and updated as allowed or prevented by other policy settings.

French text from Windows 11 26H2

Ce paramètre de stratégie vous permet de spécifier une liste d’ID d’instances de périphérique Plug-and-Play pour les périphériques que Windows ne peut pas installer. Ce paramètre de stratégie prévaut sur tout autre paramètre de stratégie autorisant l’installation d’un périphérique par Windows.

Si vous activez ce paramètre de stratégie, Windows ne peut pas installer un périphérique dont l’ID d’instance de périphérique apparaît dans la liste que vous créez. Si vous activez ce paramètre de stratégie sur un serveur Bureau à distance, ce paramètre de stratégie a une incidence sur la redirection des périphériques spécifiés depuis un client Bureau à distance vers le serveur Bureau à distance.

Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, les périphériques peuvent être installés et mis à jour conformément aux autorisations ou interdictions prévues par d’autres paramètres de stratégie.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions
Value name
DenyInstanceIDs
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: DeviceInstallation/DeviceInstall_Instance_IDs_Deny
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DenyInstanceIDs' -Value 1 -Type DWord
# Also apply to matching devices that are already installed.
# unchecked: 0
Set-ItemProperty -Path $k -Name 'DenyInstanceIDsRetroactive' -Value 1 -Type DWord
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions\DenyInstanceIDs'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Prevent installation of devices that match any of these device instance IDs
# Non-additive list: existing values of the key are cleared first
if (Test-Path -Path $k) { (Get-Item -Path $k).Property | ForEach-Object { Remove-ItemProperty -Path $k -Name ([WildcardPattern]::Escape($_)) -ErrorAction SilentlyContinue } }
$values = @('<value1>', '<value2>')  # Replace the values with your own
$i = 1
foreach ($v in $values) { Set-ItemProperty -Path $k -Name ('' + $i) -Value $v -Type String; $i++ }

Disable

# Disable: DeviceInstallation/DeviceInstall_Instance_IDs_Deny
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DenyInstanceIDs' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": DeviceInstallation/DeviceInstall_Instance_IDs_Deny
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions'
Remove-ItemProperty -Path $k -Name 'DenyInstanceIDs' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'DenyInstanceIDsRetroactive' -ErrorAction SilentlyContinue
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions\DenyInstanceIDs'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinue

Options (2)

LabelControlRegistry valueREG typeConstraints / details
Prevent installation of devices that match any of these device instance IDs:Empêcher l’installation de périphériques correspondant à l’un de ces ID d’instance de périphérique :DeviceInstall_Instance_IDs_Deny_ListList (table)listSoftware\Policies\Microsoft\Windows\DeviceInstall\Restrictions\DenyInstanceIDsValues named “” + numberREG_SZ (values under the key)
Also apply to matching devices that are already installed.Appliquer également aux périphériques correspondants déjà installés.DeviceInstall_Instance_IDs_Deny_RetroactiveCheck boxbooleanDenyInstanceIDsRetroactiveREG_DWORD
Checked: REG_DWORD = 1
Unchecked: REG_DWORD = 0

Availability

Windows 10

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

Windows Server