Using PowerShell to Add a Network Printer for All Users of a Computer


This brief article details the commands necessary to use PowerShell to add/install/map a network printer for all users of a computer.


The below actions require the executing user to have administrative rights to the workstation in question.


Establish a Remote PowerShell session

In an elevated PowerShell session (running as administrator), run the following command;

Enter-PsSession -ComputerName HOSTNAME.FQDN

where HOSTNAME.FQDN is the fully-qualified domain name of the workstation in question.


You can actually execute this process using the short name of the computer instead of the FQDN.

Remove the network printer for all users

Once you’ve entered the remote PowerShell session successfully, run the following commands in sequence;

RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /n\\PRINTSERVER\Shared-printer

where PRINTSERVER is the NETBIOS name of your print server from which the printer is shared and Shared-printer is the shared name of the printer you’d like to add/install/map.

When this is complete, the network printer should be uninstalled/removed for all users on that workstation. This can be verified by having users logon and check their Devices and Printers window.

Author: griffethbarker

Griff is a tinkerer and manager of IT, consultant of IT and management, and continuous student of organizational development. His hobbies and interests include games of all types (video, board, dice, card, tabletop, etc.) as well as listening to music, photography, and writing. Find him on LinkedIn!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: