I have a Windows 2012 R2 RDS Server farm and printers deployed via a VBS Script i.e.
Dim objNetwork
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection "\\Printserver\Laserjet"
Before I had this script (which contains about 20 printers) I was deploying via preferences. The problem with using preferences, was it caused a 2-5 minute logon time. So I deleted the preferences GPO and now just use the script. My issue has been printers are now duplicating for every user. They may have 2 - 10 of the same printer on logon.
Since this is 2012 R2 the old trick of deleting printers/connections from the registry doesn't work anymore. So I tried powershell:
Remove-Printer - name \\Printserver\Laserjet
This executes correctly and if I do a:
Get-WmiObject -Class win32_printer
It no longer shows up, however, in the control panel, only one of the duplicates was removed. The others still show up. Like phantom printers, and they still work and show as online. If I right click on the printer and left click "Remove device" it will allow me to remove them. Of course that doesn't help my situation since I need to do it via script.
I read through:
But removing the registry keys do not help either. I'm thinking if I could run that "Remove device" option programmatically I'll be able to solve this problem. Does anyone have any ideas or has faced this issue?
Also I forgot to say that I deleted the following keys, and still no success:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\
Client Side Rendering Print Provider\...\Printers\
Connections\,,printserver,Laserjet
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Providers\
Client Side Rendering Print Provider\...\Printers\
Connections\,,printserver,Laserjet
HKU\...\Printers\Connections\,,printserver,Laserjet
Update 10-16-2014: After a 10 hour phone call with Microsoft PSS, they have acknowledged that Ghost Printers, and Ghost Drives are a bug in Server 2012 R2 SP1 when you remove a Preferences Group Policy. So be aware if you have a GPP adding in printers/drives, and remove it, you will get these "Ghost Printers". They said a hotfix is coming in November.
Update 3/16/2015 After multiple roll ups this is still an issue, and has not be fixed yet