Directory pruning interval
Intervalle de nettoyage d’Active Directory
Explanation
Specifies how often the pruning service on a domain controller contacts computers to verify that their printers are operational.
The pruning service periodically contacts computers that have published printers. If a computer does not respond to the contact message (optionally, after repeated attempts), the pruning service "prunes" (deletes from Active Directory) printer objects the computer has published.
By default, the pruning service contacts computers every eight hours and allows two repeated contact attempts before deleting printers from Active Directory.
If you enable this setting, you can change the interval between contact attempts.
If you do not configure or disable this setting the default values will be used.
Note: This setting is used only on domain controllers.
Spécifie la fréquence à laquelle le service de nettoyage d’un contrôleur de domaine contacte les ordinateurs pour vérifier que leurs imprimantes sont opérationnelles.
Le service de nettoyage contacte périodiquement les ordinateurs qui ont publié des imprimantes. Si un ordinateur ne répond pas au message de contact (éventuellement après plusieurs tentatives), le service de nettoyage « nettoie » (supprime d’Active Directory) les objets imprimante que l’ordinateur a publiés.
Par défaut, le service de nettoyage contacte les ordinateurs toutes les huit heures et autorise deux tentatives de contact répétées avant de supprimer les imprimantes d’Active Directory.
Si vous activez ce paramètre, vous pouvez modifier l’intervalle entre les tentatives de contact.
Si vous ne configurez pas ce paramètre ou si vous le désactivez, les valeurs par défaut sont utilisées.
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/PruningInterval
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Interval
# Possible options:
# Continuous = 0; 10 Minutes = 10; 30 Minutes = 30; 1 Hour = 60; 4 Hours = 240; 8 Hours = 480
# 12 Hours = 720; 1 Day = 1440; 2 Days = 2880; 3 Days = 4320; 4 Days = 5760; 5 Days = 7200
# 6 Days = 8640; 1 Week = 10080; 2 Weeks = 20160; 3 Weeks = 30240; 4 Weeks = 40320
# 5 Weeks = 50400; 6 Weeks = 60480; 7 Weeks = 70560; Infinite = 4294967295
Set-ItemProperty -Path $k -Name 'PruningInterval' -Value 480 -Type DWordDisable
# Disable: Printing2/PruningInterval
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": Printing2/PruningInterval
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
Remove-ItemProperty -Path $k -Name 'PruningInterval' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Interval:Intervalle :PruningIntervalTitle | Drop-down listenum | PruningInterval | REG_DWORD | Default choice (UI): #5
|