Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

replacing 2003 print server - need suggestions

Recommended Posts

We have a 2000 box currently sharing printers for our domain. The box is being replaced with a newer 2003 computer, with same printers installed and shared , just the server is named differently, i.e. server01 to server02. Time will not allow us to touch each workstation and setup the new printers, as they are all over the country. Is there a way to script removal of the old printers and add the new ones, giving each user the same printers they had, it will just be on the new server instead? Or can we just have the new print server take over these current ones?

At a loss here. :blink:

Link to post
Share on other sites

I don't know about removal, but I use the following script to install network printers.

Dim net
Set net = CreateObject("WScript.Network")
net.AddWindowsPrinterConnection "\\server\printer"

Dim net1
Set net1 = CreateObject("WScript.Network")
net.AddWindowsPrinterConnection "\\server\printer2"

save this as a vbs file. also, if you want to have multiple printers in the same file, dim net2 for the next printer, dim net3, and so on. these are just variables that need different names and values. i hope i explained this well....

Link to post
Share on other sites

is this a server 2003 r2 machine? if so check out using print management to setup users or machines

Printer Mangement

Print Management

Print Management is an updated Microsoft Management Console (MMC) snap-in that you can use to view and manage printers and print servers in your organization. You can use Print Management from any computer running Windows Server 2003 R2, and you can manage all network printers on print servers running Windows 2000 Server, Windows Server 2003, or Windows Server 2003 R2.

Print Management provides up-to-the-minute details such as the queue status, printer name, driver name, and server name. You can also set custom views by using the Print Management filtering capability. For example, you can create a view that only displays printers in a particular error state. You can also configure Print Management to send e-mail notifications or run scripts when a printer or print server needs attention. The filtering capability also allows you to bulk edit print jobs, such as canceling all print jobs at once. You can also delete multiple printers at the same time.

Administrators can install printers remotely by using the automatic detect feature, which finds and installs printers on the local subnet to the local print server. Administrators can log on to a local server at a branch location by using Remote Desktop and then easily install printers remotely.

When a printer model has a Web page feature, Print Management can display troubleshooting details, such as the location of the paper jam or printer toner level. Some printer models have Web pages that provide options for remote control functions that can help resolve problems at branch locations.

Print Management step by step

Link to post
Share on other sites

You've got locations all over the country coming back to a single print server? :wacko::blink:

That's a lot of data being shuffled back and forth since the file has to be spooled all the way to the server...and then from the server back to the printer at the location. In a situtation like that I would've opted for direct IP printing (or a local low-end server for print duties).

That's gotta be some slooooow printing for large documents too.

But...for your situation I have a KiX script that I've used to do exactly the same thing:

; Get current default printer
$DefPrn = ReadValue("HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device")

; Create an array of currently mapped printers
$Index = 0
$Key = EnumKey("HKCU\Printers\Connections",$Index)
While @ERROR = 0
If $Array = ""
$Array = "$Key"
$Array = $Array + ":" + $Key
$Index = $Index + 1
$Key = EnumKey("HKCU\Printers\Connections",$Index)

; Split the array so we can work with it
$Array = Split($Array,":")

; Remap printers to new server
For Each $Printer in $Array
Case InStr($Printer,",,OLD_SERVER,PRINTER1")
? "Deleted Old Printer Connection"
$X = DelPrinterConnection("\\OLD_SERVER\PRINTER1")
? "Creating New Printer Connection"
$X = AddPrinterConnection("\\NEW_SERVER\PRINTER1")
If InStr($DefPrn,"PRINTER1")
? "Setting Default Printer"
$X = SetDefaultPrinter("\\NEW_SERVER\PRINTER1")
Case InStr($Printer,",,OLD_SERVER,PRINTER2")
? "Deleted Old Printer Connection"
$X = DelPrinterConnection("\\OLD_SERVER\PRINTER2")
? "Creating New Printer Connection"
$X = AddPrinterConnection("\\NEW_SERVER\PRINTER2")
If InStr($DefPrn,"PRINTER2")
? "Setting Default Printer"
$X = SetDefaultPrinter("\\NEW_SERVER\PRINTER2")
Case InStr($Printer,",,OLD_SERVER,PRINTER3")
? "Deleted Old Printer Connection"
$X = DelPrinterConnection("\\OLD_SERVER\PRINTER3")
? "Creating New Printer Connection"
$X = AddPrinterConnection("\\NEW_SERVER\PRINTER3")
If InStr($DefPrn,"PRINTER3")
? "Setting Default Printer"
$X = SetDefaultPrinter("\\NEW_SERVER\PRINTER3")

Link to post
Share on other sites

Here is what I used when we migrated print servers.


This script will remove all printers attached to the print server specified in the script. It will not remove any other printers.

So you can just run this as well as your new printer map script and they wont conflict.. Unless your adding printers from the print server you are trying to remove.

Hope it helps.

Edited by chilifrei64
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...