I was asked to add pinters to all users on a terminal server. There is a VPN connection between the terminal server and the network where the printer is installed.

I do not have much experience with network shares, but I managed to connect to the printer manually. (win+r > \192.168.xx.xx). After entering my credentials (Domain: ADAM.local) I see the shares in explorer, including a couple of printers. Double-clicking a printer adds it to the "printers and devices" and I am able to select it as a printer wehn trying to print a document.

I was hoping to be able to use "net use" to write a script that will connect a user to the printer on startup.

I tried using net use * \\192.168.xx.xx <password> /user:ADAM.local\printACC /persistent:yes to connect to the network share. This results in an error: System error 67 has occurred. The network name cannot be found.

Could anyone help me with the syntax and parameters for the net use command?

link|improve this question
What type of server is this? What type of server is your print server? – Nixphoe Feb 3 at 12:28
@Nixphoe It's a terminal server on Windows Server 2008 R2. I am not sure what type of printer server it is. All I got from the tech guy @ the customer are the IP of the share, the domain and the share's account login details. – Chielt Feb 4 at 20:36
feedback

1 Answer

You can't use the net use command.

You do have a few options however. If you have a 2008 Domain, you can use Group Policy to deploy your printers.

If you don't have a 2008 print server, you'll need to use a login script. Add the following line to your login script:

cscript \\domain.local\NETLOGON\Printer.vbs //B

After that, add a file, call it Printer.vbs and put the following in it.

Option Explicit
Dim objNetwork, strPrinter1,strPrinter2,strPrinter3

strPrinter1 = "\\servername\printerx"
strPrinter2 = "\\servername\printery"
strPrinter3 = "\\servername\printerz"

Set objNetwork = CreateObject("WScript.Network") 
objNetwork.AddWindowsPrinterConnection strPrinter1
objNetwork.AddWindowsPrinterConnection strPrinter2
objNetwork.AddWindowsPrinterConnection strPrinter3

WScript.Quit
link|improve this answer
But connecting to the network share requires a password and a domain. How do I sort this? I have the following details: IP: 192.168.xx.xx Domain: ADAM.local Username: PrintACC Password: <pass> – Chielt Feb 3 at 12:46
Ah, I guess I didn't understand that requirement correctly, so the terminal server isn't on the domain? – Nixphoe Feb 3 at 14:19
The printers are in the company building. The terminal server is in the datacenter. There is a VPN between the two. Start > Run > \\192.168.xx.xx gives me a login prompt. I then fill in ADAM\PrintACC and a password. An explorer window then pops up showing me the network share. I then double click one of the printers listed. The terminal proceeds by adding the printer to my "printers and devices". Ik also opens the printer que window. The TS is in the PROFIT\ domain. – Chielt Feb 3 at 14:58
I am trying to deploy the printers using "Print Management" but the printers are not listed. Trying to add them with TCP/IP seems impossible, and they are also not detected by the wizzard... – Chielt Feb 3 at 15:00
feedback

Your Answer

 
or
required, but never shown

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