Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been using "net use" successfully to connect to shared drives on my network with Windows 7. Now, I am trying to connect a Windows 7 computer to a shared printer on a windows 7.

So, on the client computer I've done through it the GUI to see everything works properly. Than, I disconnected the printer and tried using the command line to do the same thing like this:

net use \\FRONTPC\FCPrinter 

it says:

The command completed successfuly.

However I don't see the printer under "Devices and Printers". So, where is the printer? What am I doing wrong?

share|improve this question
up vote 3 down vote accepted

From ss64:

"NET USE command can map a network printer to an LPT port (for DOS type applications that print to a port.) but this does not add the printer to the Control Panel GUI."

If you're limited to using cmd, you might want to use Rundll32 printui.dll,PrintUIEntry.

If you can use PowerShell, you can do something like this:

$prnt = [wmiclass]"Win32_Printer"

share|improve this answer
thanks, that looks useful, but I'm still not getting the awkward syntax of the printui.dll command... can you explain? – Oz123 Dec 8 '11 at 20:29
Something like RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /n\\PrintServer\PrintShare should work. There's a good outline with examples here – MDMarra Dec 8 '11 at 20:44
I managed to "add" the printer using powershell. However... The print test page fails ... And, I know it works using the gui... So there is still one more step missing...Maybe it's the driver ? – Oz123 Dec 8 '11 at 20:56
@Oz123 I have that exact code in a larger script that successfully maps printers for hundreds of computers without issue. – MDMarra Dec 8 '11 at 20:58
I guess it is is a driver issue ... On another printer the return code was 0, so the printer did succeed with printing a test page. However with the faulty printer the error code was 1797... – Oz123 Dec 8 '11 at 21:03

When you are using cmd - net use command you won't get Printer in your Devices and printers. This command is good for MS DOS based applications to print on LPT port even if your PC doesn't have any. Sometimes even you have installed USB printer you simply can't print through MS DOS apps and that is scenario where you use this way to map your Printer on a LPT port.

On this post I have explained how to use this command in Local Network with a PC running Win 7 and other running Win XP

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.