Category filter

Script to Add Printers on Windows 10 devices

Many organizations require printers for their daily works. Manually adding printers to employees’ devices is a tedious task. The installation and configuration procedure can be automated to save time and make the process easier. You can add printers on Windows 10 devices remotely by executing custom scripts via Hexnode.

Disclaimer:

The Sample Scripts provided below are adapted from third-party Open-Source sites.

Batch Script

To add a network printer.

Replace ‘servername’ and ‘Serverprinter’ with your organization’s printer server and required printer name.

rundll32 : Loads and runs 32-bit dynamic-link libraries (DLLs).

printui.dll : It is the executable file that contains the functions used by the printer configuration dialog boxes.

/in : Connects to a remote printer.

/n : Specifies the printer name.

Powershell Script

To add a network printer.

Replace ‘printServer’ and ‘printerName’ with your organization’s printer server and required printer name.

To add a local printer.

Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository