Manage Print Driver exclusion list
Gérer la liste d’exclusion du pilote d’impression
Explanation
This policy setting controls the print driver exclusion list. The exclusion list allows an administrator to curate a list of printer drivers that are not allowed to be installed on the system.
This checks outranks the signature check and allows drivers that have a valid signature level for the Print Driver signature validation policy to be excluded.
Entries in the exclusion list consist of a SHA256 hash (or SHA1 hash for Win7) of the INF file and/or main driver DLL file of the driver and the name of the file.
If you disable or do not configure this policy setting, the registry key and values associated with this policy setting will be deleted, if currently set to a value.
Ce paramètre de stratégie contrôle la liste d’exclusion des pilotes d’impression. La liste d’exclusion permet à un administrateur d’organiser une liste de pilotes d’imprimantes qui ne sont pas autorisés à être installés sur le système.
Cette opération vérifie la vérification des signatures et permet d’exclure les pilotes dont le niveau de signature est valide pour la stratégie de validation de signature du pilote d’impression.
Les entrées de la liste d’exclusion sont constituées d’un hachage SHA256 (ou d’un hachage SHA1 pour Win7) du fichier INF et/ou du fichier DLL du pilote principal et du nom du fichier.
Si vous désactivez ou ne configurez pas ce paramètre de stratégie, la clé de Registre et les valeurs associées à ce paramètre de stratégie sont supprimées, si la valeur est actuellement définie.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\Driver- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
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: Printing/ManageDriverExclusionList
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers\Driver\ExclusionList'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# File Hash File Name
# 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 } }
$items = @{
'<name1>' = '<value1>'
'<name2>' = '<value2>'
} # Replace the values with your own
$items.GetEnumerator() | ForEach-Object { Set-ItemProperty -Path $k -Name $_.Key -Value $_.Value -Type String }Disable
# Disable: Printing/ManageDriverExclusionList
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": Printing/ManageDriverExclusionList
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers\Driver\ExclusionList'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| File Hash File Name:Nom du fichier Hachage de fichier :Driver_ExclusionListEntry | List (table)list | Software\Policies\Microsoft\Windows NT\Printers\Driver\ExclusionListName = value pairs | REG_SZ (values under the key) |