Allow printers to be published
Autoriser la publication des imprimantes
Explanation
Determines whether the computer's shared printers can be published in Active Directory.
If you enable this setting or do not configure it, users can use the "List in directory" option in the Printer's Properties' Sharing tab to publish shared printers in Active Directory.
If you disable this setting, this computer's shared printers cannot be published in Active Directory, and the "List in directory" option is not available.
Note: This settings takes priority over the setting "Automatically publish new printers in the Active Directory".
Détermine si les imprimantes partagées de l’ordinateur peuvent être publiées dans Active Directory.
Si vous activez ce paramètre ou que vous ne le configurez pas, les utilisateurs peuvent utiliser l’option « Répertorier dans l’annuaire » sous l’onglet Partage des propriétés de l’imprimante pour publier des imprimantes partagées dans Active Directory.
Si vous désactivez ce paramètre, les imprimantes partagées de cet ordinateur ne peuvent pas être publiées dans Active Directory et l’option « Répertorier dans l’annuaire » n’est pas disponible.
Remarque : ce paramètre a priorité sur le paramètre « Publier automatiquement les nouvelles imprimantes dans Active Directory ».
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers- Value name
PublishPrinters
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_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: Printing2/PublishPrinters
$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 'PublishPrinters' -Value 1 -Type DWordDisable
# Disable: Printing2/PublishPrinters
$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 'PublishPrinters' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": Printing2/PublishPrinters
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
Remove-ItemProperty -Path $k -Name 'PublishPrinters' -ErrorAction SilentlyContinue