-
Notifications
You must be signed in to change notification settings - Fork 5
printers_remove_all.ps1
Corey Watson edited this page Dec 19, 2025
·
1 revision
Removes ALL installed printers, their associated ports, and unused printer drivers from Windows.
This script is a destructive operation that removes all installed printers, their associated ports, and unused printer drivers from Windows. Use with caution - this cannot be undone.
Removes ALL installed printers, their associated ports, and unused printer drivers from Windows. Use with caution - this is a destructive operation that cannot be undone.
- Windows 10/11 or Windows Server
- Administrator privileges
- Print Spooler service running
-
$removeDrivers: Whether to also remove unused printer drivers (default: true) -
$removePorts: Whether to also remove orphaned printer ports (default: true)
- Enumerates all installed printers
- Removes each printer
- Removes orphaned TCP/IP printer ports (optional)
- Removes unused printer drivers (optional)
- Reports results
- No secrets in logs
- Destructive operation - removes ALL printers
- Cannot be undone without reinstalling printers
- 0 = Success
- 1 = Failure
[ INPUT VALIDATION ]
--------------------------------------------------------------
Remove Drivers : True
Remove Ports : True
[ REMOVING PRINTERS ]
--------------------------------------------------------------
Found 3 printer(s)
Removing : HP LaserJet Pro MFP M428fdw
Removing : Microsoft Print to PDF
Removing : Canon LBP6030
Removed 3 printer(s)
[ REMOVING PRINTER PORTS ]
--------------------------------------------------------------
Found 2 orphaned port(s)
Removing : IP_192.168.1.100
Removing : IP_192.168.1.101
Removed 2 port(s)
[ REMOVING UNUSED DRIVERS ]
--------------------------------------------------------------
Removed unused printer drivers
[ FINAL STATUS ]
--------------------------------------------------------------
Result : All printers removed successfully
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
- 2024-12-01 v1.0.0 - Initial release - converted from batch script
- View Script Source
- Scripts - Back to script index