The number of printers is increasing

Андрей Михалевский 2,641 Reputation points
2021-05-27T10:53:31.867+00:00

Hello. I have rds, windows server 2019. Each time you log into the server, the number of printers increases by 1.
Why is this happening and how can I fix it?

Printers mapping by GPO from print server.

100264-print.png

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,255 questions
Windows Server Printing
Windows Server Printing
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Printing: Printer centralized deployment and management, scan and fax resources management, and document services
641 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2021-06-02T13:24:18.94+00:00

    Hi,

    Let's follow the steps below.

    First of all, please back up the problematic server and registry key.

    https://support.microsoft.com/en-us/topic/how-to-back-up-and-restore-the-registry-in-windows-855140ad-e318-2a13-2829-d428a2ab0692

    1.Manually remove all printers from the control panel.

    2.Download PSExec and run the following script in PowerShell as administrator to remove existing obsolete entries: (place pstools in this path: C: \ temp \ PSTools \ Psexec.exe)

    Start-Process -FilePath cmd.exe -Verb Runas -ArgumentList '/k C:\temp\PSTools\Psexec.exe -I -s powershell.exe'
    Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM*" -Recurse
    Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceClasses*" -Recurse
    Remove-Item -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider*" -Recurse

    PsExec v2.34
    https://learn.microsoft.com/en-us/sysinternals/downloads/psexec

    3.Configure the registry key and restart the terminal server 2019, finally we can check the result.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\RemovePrintersAtLogoff
    Value = 0

    4.Some Window Server 2019 Terminal Servers need to install the latest update to fix this issue.

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Best regards

    0 comments No comments

7 additional answers

Sort by: Most helpful
  1. Андрей Михалевский 2,641 Reputation points
    2021-06-02T14:20:08.707+00:00

    Thanks. It works. Other resources advise setting the value to 1. Why? Can you explain in more detail?


  2. Андрей Михалевский 2,641 Reputation points
    2021-06-23T13:25:17.02+00:00

    Hi. It was discovered that the default printer sometimes goes to Default Printer PDF. Does anyone know how to fix this

    0 comments No comments

  3. Anonymous
    2021-06-25T15:40:27.24+00:00

    Hi, I will keep you updated with the progress.

    0 comments No comments