How to Install, Add, Remove and Manage Printers with PowerShell

Written by Horatiu Vladasel · January 26th, 2026 · 3min read

Managing printers with PowerShell gives you a scriptable approach to add or remove printers, list installed printers, or set a default printer. This approach is especially useful in environments where automation, consistency across machines, or mass deployment is required – for example, using deployment tools like ConfigMgr (SCCM) or Intune.

In this article, we’ll cover:

  1. Listing existing printers
  2. Installing printers’ drivers
  3. Adding printers (shared network / local)
  4. Removing printers
  5. Setting the default printer

1. Listing Existing PrintersCopy link to this sectionLink to this section copied!

To see which printers are installed on the current machine, you can use the following PowerShell cmdlet:

Get-Printer | Format-Table Name, DriverName, PortName, Shared -AutoSize

This will display each printer’s name, driver, port, and whether it’s shared or not.

If you want more details about the drivers or ports installed, you can also use:

  • Get-PrinterDriver: lists the installed printer drivers
  • Get-PrinterPort: lists the printer ports configured on the machine

2. Installing Printers’ DriversCopy link to this sectionLink to this section copied!

To add the driver package to the Driver Store and install it, you can use the following command line:

pnputil.exe /add-driver <path to the inf file> /install

When a Driver Package is installed, the INF file and all referenced files are copied to the Driver Store. The INF file must reference all of the required files for device installation so that they are present in the Driver Store.

Once the driver is installed, you can use the following PowerShell cmdlet to make the driver available in the list of printers in the repository:

Add-PrinterDriver -Name “<DriverName>”

You can get the DriverName from within the .inf file.

3. Adding PrintersCopy link to this sectionLink to this section copied!

Adding a shared network printer

To add a shared network printer, you can use the PowerShell cmdlet listed below. All you need is the name of the shared printer to which you want to connect.

Add-Printer -ConnectionName \\PrintServer\My Printer

Adding a local printer

To add a local printer, you can use the following PowerShell cmdlet:

Add-Printer -Name "<PrinterName>" -DriverName "<DriverName>" -PortName "<PortName>"

Where:

  • PrinterName is the name of the printer to add
  • DriverName is the name of the printer driver
  • PortName is the name of the port that is used or created for the printer

4.Removing PrinterCopy link to this sectionLink to this section copied!

If you want to remove a printer, you can simply use:

Remove-Printer -Name "<PrinterName>"

This will uninstall the printer from the system. If you also want to clean up drivers or ports no longer used, you can use:

Remove-PrinterDriver -Name "<DriverName>"
Remove-PrinterPort -Name "<PortName>"

Removing unused drivers or ports helps keep the environment clean and avoids clutter.

5.Setting the Default PrinterCopy link to this sectionLink to this section copied!

Once your printers are installed, you may want to set one as the default. You can do that by using the following PowerShell cmdlet:

Set-Printer -Name "<Printer Name>" -IsDefault $true

Final TakeawaysCopy link to this sectionLink to this section copied!

In short, PowerShell can manage printers in the following ways:

  • Receive a list of printers present on the machine: Get-Printer | Format-Table Name, DriverName, PortName, Shared -AutoSize
  • Installing printer drivers: Add the driver package to the Driver Store and install it: pnputil.exe /add-driver <path to the inf file> /install; Make the driver available in the list of printers in the repository: Add-PrinterDriver -Name “<DriverName>”
  • Adding printers: Shared network printer: Add-Printer -ConnectionName \\PrintServer\My Printer; Local network printer: Add-Printer -Name "<PrinterName>" -DriverName "<DriverName>" -PortName "<PortName>"
  • Remove printers: Removing printers generally: Remove-Printer -Name "<PrinterName>"; Remove printer driver: Remove-PrinterDriver -Name "<DriverName>"; Remove printer port: Remove-PrinterPort -Name "<PortName>"
  • Set a default printer: Set-Printer -Name "<Printer Name>" -IsDefault $true

ConclusionCopy link to this sectionLink to this section copied!

Using PowerShell to manage printers gives you a powerful, flexible, and automatable alternative to manual GUI configuration.

NoteSign up to receive the latest news, videos, exclusive how-tos, and guides from Advanced Installer every week. (You can unsubscribe at any time.)

Written by
See author's page
Horatiu Vladasel

Horatiu is a Software Packager/Sequencer with over 10 years experience, who has worked as a Software Packager at IBM and is currently offering software packaging services to companies such as BT or Nationwide.

Comments: