- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report Inappropriate Content
Okay...
I created a reg file to do this...
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider]
"InactiveGuidPrinterAge"=dword:00000384
"ActiveGuidPrinterAge"=dword:00000384
"InactiveGuidPrinterTrim"=dword:00000384
"RemovePrintersAtLogoff"=dword:00000001
Then, I created a bat file, to do the following, on user log off from the terminal server.
reg delete "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Devices" /f /va
reg delete "HKCU\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts" /f /va
You MAY want to add this line, but I didn't find it necessary...
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers" /f /va
You'll probably have to elevate privileges if you push in the last line...
I loaded this up as a GPO, so it happens everytime someone logs off.
Next, tackling the servers...
Stop the print spooling service, if you can...
Clean up the USERS\.DEFAULT\Printers key on all existing servers
You'll need some tools.
https://www.nirsoft.net/utils/regscanner.html
I used the 64 bit version of this, to scour my registry for any redirected printers, in the users key
I found 45,000 redirected printers in this key alone, on three servers...
Just use the regscanner to look for the word redirected, and delete them all... you'll have to run the regscanner program as administrator to do this.
Do the same thing, for this key...
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers
Once all of them run, without any more detections of the word "redirected" you should be golden.
I used regscanner, so I wouldn't delete actual printers, just all the blasted "redirected" printers, that simply would NOT go away.