This PowerShell script facilitates printer management in Windows environments, offering functionalities such as installing and removing printers, sending bulk test pages, cleaning print queues, and conducting an inventory of printers connected to the system.
-
Printer Installation: Allows the installation of printers specified in a CSV file containing details such as the name, local port, and driver.
-
Printer Deletion: Facilitates the deletion of printers and their associated ports based on information provided in a CSV file.
-
Test Page Sending: Sends test pages to printers specified in a CSV file to verify their proper functionality.
-
Print Queue Cleaning: Stops the print queue service, deletes all pending jobs, and restarts the service. It is recommended not to use during productive hours.
-
Printer Inventory: Generates a CSV file containing detailed information about printers installed on the system, including the name, port, driver, and status.
- Clone or download the repository.
- Run the
PrinterManagement.ps1
script from PowerShell. - Create a CSV file with the next format:
Name;LocalPort;DriverName printer1;\\computer\printer1;Epson printer2;192.168.1.156;Epson
- Select the desired option from the menu.
- PowerShell 5.1 or higher.
- Administrator permissions to perform certain actions.
- This script must be run with administrator privileges.
- Cleaning the print queue (option 4) may interrupt the printing of ongoing documents.