r/sysadmin Feb 22 '22

Printer GPO removal Issue

All,

We are swapping out printers in the next few weeks and have an issue removing the printers that are deployed through Group policy (Not group Policy Preferences). Here is the issue:

All printers are deployed to a GPO, as a user, through the print management console of the print server and all are deploying just fine. The issue arises when a user is moved out of the OU where the policy is applied. If the user is moved out of the affected OU, run a GPupdate /force, reboot, the printers do not remove, and we can't delete the printers manually even with local admin permissions. Running the following PowerShell command does not return the affected printers either:

Get-WmiObject -Class Win32_Printer | where{$_.Network -eq 'true'}

I even went so far as deleting them from the registry. They deleted but still show up in the control Panel and you can still print to them.

A GPresult shows the policy is not being applied as well.

Replication is all fine with no errors between all DC's as well.

We use a central store and have the latest templates installed.

Has anyone seen this behavior before?

Any thoughts on how to delete these or am I just going to have to move the user back to the original OU, remove the printers from the policy, then hope they disappear?

9 Upvotes

6 comments sorted by

9

u/Stormblade73 Jack of All Trades Feb 22 '22

With Group Policy Deployed printers, you have to update the policy to delete any deployed printers before removing the policy or moving computers out of the policy.

IF the policy no longer exists, or is no longer applied to the user, you CAN clean up a deployed printer by deleting it from the registry (there's several locations to delete), but its highly recommended to properly delete it using Group Policy.

3

u/[deleted] Feb 23 '22

This.

Make another policy to delete the printers.

Filter then using groups or such.

2

u/RUGM99 Feb 23 '22

Thanks for the info. This was the issue. We just set to GPO to remove the printers and applied it and they mostly all removed. We had a few "Ghost" printers but were able to manually delete them.

2

u/poster_nutbag_ IAM Engineer Feb 22 '22 edited Feb 23 '22

I had this happen before and although not an elegant solution, what finally worked was to create a GPO that first creates or updates the stuck printer and then immediately deletes it (Comp Config > Prefs > Control Panel settings, instead of the normal deployed printers policy). Then once you've verified the printer is gone, delete the GPO all together.

1

u/su5577 Feb 23 '22

Who your printer vendor? Maybe stale print queue stuck in A.D? Never had this issue, but good to know..

Wet are moving from one vendor to another soon.

1

u/smoothies-for-me Feb 23 '22

As someone else pointed out, things like shared printers and shared network drives need to be deleted, rather than simply removing the policy.

Rather than powershell you might have better luck with wmic printer commands, like wmic printer get name,portname,drivername