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.
Batch Script
To add a network printer.
1 |
rundll32 printui.dll,PrintUIEntry /in /n\\servername\Serverprinter |
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.
1 |
Add-Printer -ConnectionName \\printServer\printerName |
Replace ‘printServer’ and ‘printerName’ with your organization’s printer server and required printer name.
To add a local printer.
1 |
Add-Printer -Name "mxdw 2" -DriverName "Microsoft XPS Document Writer v4" -PortName "portprompt:" |