Share a Windows 10 printer by UNC

Windows 10 uses homegroups, but if you have systems that don’t understand homegroups and want to share a Windows 10 printer by UNC (the old school way to share a network printer), it’s not obvious how to go about doing it.

I couldn’t find a way from the GUI, but it’s still possible to share the printer from a command line.

Type “CMD” in the search bar, then issue the following command:

wmic printer get name

The computer responds with something like this:

Print as a PDF
Microsoft XPS Document Writer
Microsoft Print to PDF
HP LaserJet 4100 Series PS Class Driver

Let’s say I want to share out my HP 4100. I would issue these two commands:

rundll32 printui.dll,PrintUIEntry /Xs /n "HP LaserJet 4100 Series PS Class Driver" Sharename "HP4100"

rundll32 printui.dll,PrintUIEntry /q /Xs /n "HP4100" Attributes Shared

The underlined part needs to match what the computer printed in the output above. You can copy and paste it by highlighting it with the mouse, then right-clicking when it comes time to type that part. The part in bold needs to match in the two commands. That’s the name of the printer, and I always try to keep it fairly short and avoid spaces.

Finally, type the command hostname to find the name of your computer. My computer is named WIN-OHG4UKJFCKP because I never changed it.

Now, how do you put this network printer to use by reaching it from another system? On most versions of Windows, I can quickly set up that printer by typing this in the run prompt or search bar:


If that doesn’t work, I would set up the printer the way I would a local printer, then when asked for the printer name, use \\WIN-OHG4UKJFCKP\HP4100.

It’s not as user-friendly as homegroups but if you have a machine that doesn’t understand homegroups, like a Mac or Linux box or a very old Windows box, this is a quick and dirty way to allow them to connect to your printer, and you only have to do it once.

And that’s how you share a Windows 10 printer by UNC.

Further reading

If you also need to connect a network printer to Windows 10, see this entry. You can also add a generic printer, and here’s how to change your printer’s IP address if you need to.

If you’re not completely happy with Windows 10, here’s how to improve its performance.

%d bloggers like this:
WordPress Appliance - Powered by TurnKey Linux