4

My users are on 2012 R2 RDS Session Host servers.

I've used "Deploy Printers" (from Print Manager) to deploy 4 printers. The last week, I've had a lot of problems where users can't print. If I deleted the printer and added it again, they could print just fine.

Now I've removed all printer deploying from GPO - and I have no printers in any login scripts. I did a gpupdate /force, but all the 4 printers are now listed 3 times...

enter image description here

If I delete the printers and log off and back on, all the printers are popping up again. Sigh! This is driving me nuts.

This script doesn't show any of the "SVFREJA" printers...

Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colPrinters = objWMIService.ExecQuery ("Select * From Win32_Printer")

If colPrinters.Count <> 0 Then 'If there are some network printers
    Dim s
    s = ""
        For Each objPrinterInstalled In colPrinters ' For each network printer
        s = s + objPrinterInstalled.Name + chr(13)
        Next
    msgbox s
End if

It gives me this result...

enter image description here

(sry for the big picture)

My problem is not with the "redirected" printers, my problem is that I have several printers with the same name (on SVFREJA) and I can't get rid of them.

Any idea why I can't get rid of the "ophaned" printers??

7 Answers 7

12

I had this exact same problem. After I deleted a Group Policy printers kept coming back all over the place.

The only solution for me was:

  • Downloading PSTools
  • Running CMD as administrator
  • Run the command psexec -i -s c:\windows\regedit.exe (make sure you don't have regedit open already, otherwise it gives an error)
  • Delete all keys under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM which contained the printer name that keeps coming back.

You have to use the PStools option, because otherwise you will get an access denied error when deleting the regkeys.

3
  • 1
    this was exactly was I did to resolve the same issue.
    – Thomas
    Sep 28, 2017 at 21:41
  • We had a ton of printers (like ~100) showing up for everyone logging into an RDS host, and we hadn't deployed most of them via Group Policy anywhere at any point in time. We're wondering if it wasn't because we cloned a server and did a sysprep to build the RDS host. At any rate, this regedit was the solution for us as well, thanks much! Jan 17, 2020 at 17:07
  • See "Credit to Herman Brood and Benjamin Chan..." post below
    – Novox
    4 hours ago
2

Looking to see if you found a solution. I'm running into the exact same issue. Definately not redirected printers.

If I look at the events I can see - Kernal-PnP:

Device SWD\PRINTENUM{5251368F-DFD2-4635-8ED1-B37C4AF55D58} was deleted.

Class Guid: {1ed2bbf9-11f0-4084-b21f-ad83a8e6dcdc}

One minute later: Device SWD\PRINTENUM{5251368F-DFD2-4635-8ED1-B37C4AF55D58} was configured.

Driver Name: PrintQueue.inf Class Guid: {1ed2bbf9-11f0-4084-b21f-ad83a8e6dcdc} Driver Date: 06/21/2006 Driver Version: 6.3.9600.16384 Driver Provider: Microsoft Driver Section: NO_DRV Driver Rank: 0xFF0000 Matching Device Id: PRINTENUM\PrinterConnection Outranked Drivers: oem10.inf:lptenum\zebra_technologiesztf670:00FF0001 oem14.inf:lptenum\zebra_technologiesztf670:00FF0001 c_swdevice.inf:SWD\GenericRaw:00FF3001 Device Updated: false

EDIT: I believe I found my fix here: http://social.technet.microsoft.com/Forums/windowsserver/en-US/71d06204-3735-4473-8bc9-20be9e19090e/problem-with-multiple-instances-of-shared-printers-being-installed-on-client-computers-when-the?forum=winserverprint

Hate having to dive into the registry but it looks like going into the Client Side Rending Print Provider keys under the HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Providers\ and cleaning out anywhere there s a reference to the persistent "zombie" printers.

1
  • See "Credit to Herman Brood and Benjamin Chan..." post below
    – Novox
    4 hours ago
1

Those are printers being redirected from the local computers of the users who have sessions on the RDS server. Those ARE NOT local printers on the RDS server. If you don't want those printers to be redirected from the local computers to the RDS server then disable Printer Redirection on the RDS server.

1
  • I'm sorry for not making myself clear. My problem is not with the printers with (redirected) ... my problem is that I have 3 printers called "HAD - Print 1 på SVFREJA", 4 printers called "TAA - Print 1 på SVFREJA" and 3 printers called "TAA - Print 2 på SVFREJA" ... it's kinda like ophaned printers, but I can't remove them.
    – MojoDK
    Jun 10, 2014 at 20:12
1

Had this exact problem and drove me crazy for over a week. To resolve this issue install the Printer Management role (or Printer and Document Service) on the session host.

0
  • This steps worked for me:
  • Open "Administrative Tools", then "Print Management"
  • Select "All Printers" -Find the printer in question -the status will be something like "Deleting - Offline" and there was 1 pending job. I right-clicked, selected "Cancel All Jobs", and the printer immediately disappeared.
0

I ran into this once on some workstations that had been imaged with an older Kaspersky imaging server. Ended up building a completely brand new Kaspersky image. Nothing else we did would permanently remove the printers.

Is it possible that your server has gone through one or more OS upgrades?

0

Credit to @Herman Brood and @Benjamin Chan, here are the instructions that resolved the issue for me (a merge of what both mentioned above):

Anything under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM seems to be derived from errant references within HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Providers\ and/or HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Providers\ which therefore need to be deleted to cure the issue.

Find the errant queues in Device Manager. Since I've fixed the issue, I don't have them anymore, but as an example, refer to the "Location" in the "General" tab of each errant queue:

enter image description here

For me, the location said something similar to:

\Users\S-1-5-21-4#########8-3########4-1#########6-1#####5\Printers\^\^\{print server name}^\{printer name}

  • Download PSTools
  • Run CMD as administrator
  • Run the command psexec -i -s c:\windows\regedit.exe (make sure you don't have regedit open already, otherwise it gives an error. The -s switch allows you to impersonate SYSTEM, which is necessary for permission to delete these keys from the registry.)
  • Delete all keys under HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Providers\ which contain each "Location" determined above.
  • Delete all keys under HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Providers\ which contain each "Location" determined above (I didn't have any, likely because everything is 64 bit).
  • Uninstall the errant Print Queues: enter image description here
  • Cycle the Print Spooler and cross your fingers. Printers should not return (they didn't for me).

As an aside, deleting keys under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM seems to work similar (if not equivalent) to uninstalling the queue from Device Manager. If the keys under HKLM\Software[\Wow6432Node]\Microsoft\Windows NT\CurrentVersion\Print\Providers\ aren't deleted, the errant queues return.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.