Share Windows printer using the PowerShell command

Setting up printer sharing is a wonderful function. Because this way you can quickly and easily set up access to other printers in the network in your home network or in the company environment. By default, printer releases are made in the printer settings, most Windows users are probably familiar with this function.

It is the same with Windows 10, here you can carry out these releases very easily via the Windows 10 settings app.

Share printer using PowerShell

Another very quick and helpful function is printer sharing using the PowerShell command . All you have to do is start a PowerShell console with administrative rights . Then you can first get an overview of the installed local printers and network printers by issuing the following command.

Get-Printer | Format-Table Name, ShareName, Shared

Incidentally, this is the same command we used a few days ago to rename printer names using PowerShell .

Printer sharing via PowerShell command

In our example you can see that there are 2 printers and both are not released (Shared = False).

To set up printer sharing , the following PowerShell command is necessary.

Set-Printer -Name “PRINTER NAME” -Shared $ True -ShareName “SHARED NAME”

Of course you have to replace the two placeholders ” printer name ” and ” share name ” with meaningful data. The printer with the specified name is then released. We then issued the first command again to check whether the printer release also worked. You can see this by the ShareName “HP6970” and by the “Shared = True”.

However, you can also do this

check by using the point in the Windows 10 Settings app

Devices (Bluetooth, printer, mouse)

calls up and changes to the item ” Printers & Scanners “. There you will then be the local printer listed, and you can in the printer properties then on the Printer Sharing tab change.

Windows 10 printer sharing

Here you can see that the printer has been given the name ” HP6970 ” as the ” share name” . Setting up such printer sharing using PowerShell is much faster than using the Windows GUI.

Further information about printers can also be found here:

Uninstall printer driver in Windows 10 – Printer monitoring with the PRTG Network Monitor
– Windows 10 does not always show all printers
– Devices and printers create desktop shortcut
– 0xC19A0013 – Error code when using HP printers
– Point and print problems when installing printer drivers under Windows 10
– Error code 0x00000709 when setting the Windows standard
printer – Printer error message 0x803c010b
– Windows 10 – Deactivate “Let Windows automatically manage standard
printer ” – Delete printer drivers under Windows 10 with PNPUTIL
– Use network printer without domain joining