Open in the explorer

Allow pruning of published printers

Autoriser le nettoyage des imprimantes publiées

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Printers FR: Configuration ordinateur › Stratégies › Modèles d'administration › Imprimantes
Supported on
At least Windows 2000 FR: Au minimum Windows 2000
ADMX file
Printing2.admx
Internal name
Printing2/ImmortalPrintQueue

Explanation

Determines whether the domain controller can prune (delete from Active Directory) the printers published by this computer.

By default, the pruning service on the domain controller prunes printer objects from Active Directory if the computer that published them does not respond to contact requests. When the computer that published the printers restarts, it republishes any deleted printer objects.

If you enable this setting or do not configure it, the domain controller prunes this computer's printers when the computer does not respond.

If you disable this setting, the domain controller does not prune this computer's printers. This setting is designed to prevent printers from being pruned when the computer is temporarily disconnected from the network.

Note: You can use the "Directory Pruning Interval" and "Directory Pruning Retry" settings to adjust the contact interval and number of contact attempts.

French text from Windows 11 26H2

Détermine si le contrôleur de domaine peut nettoyer (supprimer d’Active Directory) les imprimantes publiées par l’ordinateur local.

Par défaut, le service de nettoyage du contrôleur de domaine nettoie les objets imprimante d’Active Directory si l’ordinateur qui les a publiés ne répond pas aux demandes de contact. Lorsque l’ordinateur qui a publié les imprimantes redémarre, il publie à nouveau tous les objets imprimante qui ont été supprimés.

Si vous activez ce paramètre ou si vous ne le configurez pas, le contrôleur de domaine nettoie les imprimantes de l’ordinateur local lorsque celui-ci ne répond pas.

Si vous désactivez ce paramètre, le contrôleur de domaine ne nettoie pas les imprimantes de l’ordinateur local. Ce paramètre est destiné à empêcher le nettoyage des imprimantes lorsque l’ordinateur est temporairement déconnecté du réseau.

Remarque : vous pouvez utiliser les paramètres « Intervalle de nettoyage d’Active Directory » et « Tentative de nettoyage d’Active Directory » pour régler l’intervalle entre deux contacts et le nombre de tentatives de contact.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers
Value name
Immortal
StateValue written
EnabledREG_DWORD = 0
DisabledREG_DWORD = 1

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: Printing2/ImmortalPrintQueue
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Immortal' -Value 0 -Type DWord

Disable

# Disable: Printing2/ImmortalPrintQueue
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Immortal' -Value 1 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": Printing2/ImmortalPrintQueue
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
Remove-ItemProperty -Path $k -Name 'Immortal' -ErrorAction SilentlyContinue

Availability