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
RizzleAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
0
RizzleAuthor Commented:
Ok that's fine.

I need a script which will only delete certain printers based on their name?
0
Justin YeungSenior Systems EngineerCommented:
again it is user printers or computer printers?
0
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

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 reddit.com (at first it seems rusty to download and use, but do not give up!!):

http://www.reddit.com/r/sysadmin/comments/2sew6m/pdq_deploy_packs_v270_20140114_add_usb_device/

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......
0
Justin YeungSenior Systems EngineerCommented:
life is easier with GPO.Untitled.png
0
RizzleAuthor Commented:
Used GP Preferences/Comp Side to do this.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RizzleAuthor Commented:
Question resolved
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Printers and Scanners

From novice to tech pro — start learning today.