The Silence Map

Asked on Super User by Sharpe, 3 years ago. No reply there for at least a week.

I need to write a script that removes all printers, but leaves behind the print to PDF + Fax. It also needs a sanity check, eg found 6 removed 6

I need a little help making a script that removes all printers, ports and drivers apart from the default microsoft offerings such as fax and print to pdf, and any epson printers as those are for labels and never an issue, for the purpose of fixing any printer related issues and starting as if the computer has just been imaged fresh. So far I have this: Get-Printer | Where-Object { $_.Name -notmatch PDF|txt|fax|usb|enhanced|epson|microsoft } | Remove-Printer Get-Printerdriver | Where-Object { $_.Name -notmatch PDF|txt|fax|usb|enhanced|epson|microsoft } | remove-printerdriver Get-Printerport | W

This question is one of 1 report of the same problem:

I need to write a script that removes all printers, but leaves behind the print to PDF + Fax. It also needs a sanity check, eg found 6 remov

Nobody has answered it yet, here or anywhere.

Related problems

Question by Sharpe on Super User, licensed CC BY-SA. We show a short excerpt and link to the original thread as credit.