Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tips for a print server....

Status
Not open for further replies.

DazzaC

Programmer
Jun 10, 2002
209
GB
Hi guys.
I have a W2K server that is currently acting as a domain controller and a print server.
I would like to move the printers from the DC to a seperate print server.
The only issue I have is that a number of machines have had printers added to them using \\servername\Printer Share name.
Is there any easy way of migrating these printers without visiting each individual machine?? Or will I have to take the hit and visit each machine?? Which I don't really want to do but fear I will have to!!
Thanks
 
This can be done using a VB script.

To add a printer:

Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\PrintServer\printer"
WshNetwork.SetDefaultPrinter "\\PrintServer\Printer"


To remove a printer connection:

Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.RemovePrinterConnection "\\PrintServer\printer"

Hope to have helped,

Mike.
 
i run this script to change the print server to all
domain users, when i run it local on my pc it's work correct, but when i run it trough group policy (startup script), it stop with the error:

line 2
ch 1
no network connection
error code 800708ca
origine wshnetwork.removenetworkdrive

any ideas
thank a lotta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top