Printer Removal Script

Hi all,

I would like a script which can be applied to computers on shutdown so that only specific printers are removed. Basically we're removing a lot of redundant print queues next week and we need to ensure all our users who use Laptops and Desktops have printer queues which still exist rather than the orphaned ones we're going to be removing.

We have a Citrix Environment so those users printers are being removed in a different way. But I would like a script that we can apply to Computers to ensure only specific printer queues are deleted. Reason I don't want all printer queues removed from people who have laptops is that they may have their home network printers setup.

Can this be done? If so could I have a script that can perform this.
LVL 13
Who is Participating?
RizzleAuthor Commented:
Used GP Preferences/Comp Side to do this.
Justin YeungSenior Systems EngineerCommented:
well I think it will be easier to remove the desired printer(s) via GPO

are they all network printers? network printer belongs to user configuration but not computer configuration.
RizzleAuthor Commented:
Ok that's fine.

I need a script which will only delete certain printers based on their name?
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Justin YeungSenior Systems EngineerCommented:
again it is user printers or computer printers?
Alessandro ScafariaInfrastructure Premier Field AdministratorCommented:
I would suggest to test your task in a single machine at first and then to propagate in all your environment via GPO....

You may use the free version of PDQ Admin Arsenal Software....

Use this pack from (at first it seems rusty to download and use, but do not give up!!):

Download only the Installer Packages (about 1.56 GB), not the WSUS updates......

Once you have downloaded it, in the utilities folder you'll see a "cleanup_orphaned_printers" folder.....

Use the PDQ Admin Arsenal software to perform this clean in a "test target machine".....then propagate to the other machines.....

Let me know......
Justin YeungSenior Systems EngineerCommented:
life is easier with GPO.Untitled.png
RizzleAuthor Commented:
Question resolved
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.