Open in the explorer

Directory pruning priority

Priorité de nettoyage d’Active Directory

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/PruningPriority

Explanation

Sets the priority of the pruning thread.

The pruning thread, which runs only on domain controllers, deletes printer objects from Active Directory if the printer that published the object does not respond to contact attempts. This process keeps printer information in Active Directory current.

The thread priority influences the order in which the thread receives processor time and determines how likely it is to be preempted by higher priority threads.

By default, the pruning thread runs at normal priority. However, you can adjust the priority to improve the performance of this service.

Note: This setting is used only on domain controllers.

French text from Windows 11 26H2

Définit la priorité du thread de nettoyage.

Le thread de nettoyage, qui s’exécute uniquement sur les contrôleurs de domaine, supprime les objets imprimante d’Active Directory si l’imprimante qui a publié l’objet ne répond pas aux tentatives de contact. Ce processus conserve les informations sur les imprimantes à jour dans Active Directory.

La priorité du thread influence l’ordre dans lequel le thread reçoit le temps processeur et détermine si les threads peuvent être remplacés par des threads de priorité plus élevée.

Par défaut, le thread de nettoyage s’exécute à un niveau de priorité normal. Vous pouvez cependant ajuster la priorité afin d’améliorer les performances de ce service.

Remarque : ce paramètre n’est utilisé que sur les contrôleurs de domaine.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers
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: Printing2/PruningPriority
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Priority level
# Possible options:
#   Lowest = 4294967294
#   Below Normal = 4294967295
#   Normal = 0
#   Above Normal = 1
#   Highest = 2
Set-ItemProperty -Path $k -Name 'PruningPriority' -Value 0 -Type DWord

Disable

# Disable: Printing2/PruningPriority
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

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

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Priority level:Niveau de priorité :PriorityLevelDrop-down listenumPruningPriorityREG_DWORD
Default choice (UI): #2
LabelValue
LowestREG_DWORD = 4294967294
Below NormalREG_DWORD = 4294967295
NormalREG_DWORD = 0
Above NormalREG_DWORD = 1
HighestREG_DWORD = 2

Availability