?
Solved

Migrating printers from one server to another

Posted on 2009-02-17
6
Medium Priority
?
505 Views
Last Modified: 2013-11-21
Hi everyone,

We have migrated our printers from our old print server to a newly build one. I used printmig.exe for the migration. After the migration I changed the dns to point to the new server. My problems is most of the users working on terminal servers printers still point to the old server(server name) and not the dns entry. Is there any way to fix this without deleteing the printers maunually from the users profile and reconnect to the correct server.
0
Comment
Question by:cabal2791
6 Comments
 
LVL 2

Expert Comment

by:reticle
ID: 23658501
Download the Microsoft Print Migrator utility.
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b9f2925-cbc9-44da-b2c9-ffdbc46b0b17&DisplayLang=en
Backup our printers and then restore on your new server.
Easy as that.
0
 
LVL 2

Expert Comment

by:reticle
ID: 23658521
Sorry only read have your question..
The second part, use Con2prt.exe to remove/readd the new printers:
http://support.microsoft.com/kb/181663

Add it to login script.
To delete all network printer
con2prt /f

Add printer:
con2prt /c \\YOUR-SERVER\PrintQueue
or
con2prt /cd  \\SERVER\QUEUE

using /cd option installs as default printer
0
 

Author Comment

by:cabal2791
ID: 23658533
This is the utility I used. The printers migrated fine, but on the TS client they still point to the old server name and not the DNS which was always used.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 2

Expert Comment

by:reticle
ID: 23658576
You can download it in the Zero Administration Kit from microsoft http://download.microsoft.com/download/2/6/0/260afc88-2253-45f8-9781-546cff07edd9/zak.exe
Unzip it and you will find con2prt.exe in \i386\tools\
0
 
LVL 6

Accepted Solution

by:
activephoto earned 2000 total points
ID: 23659563
Network connected printers are stored on a per-user basis and I would suggest that you write a script that you run one time on logon, where you look at the printers mapped and if you see the old printserver name you disconnect that printer mapping and creates a new one with the new print server name (I assume that the printer names are the same).
I wrote a quick script that will do what you want but some error checking might be in place to add, this will loop through all network attached printers on a machine and delete them if they match "old printserver name" and ad the same with the new print server name, it will also set the new one as default if the old one was default.
of course you can change so the variables strOldPrintServer and strNewPrintServer is name of the print queue instead (with some smaller adjustments).
Just put the code below in a .vbs file and run them with cscript on logon (maybe from a .cmd file)
Good luck!
/ Mikael

Set objNetwork = WScript.CreateObject("WScript.Network")
 
strOldPrintServer = "\\Server1" ' Including \\ before name
strNewPrintServer = "\\Server2" ' Including \\ before name
 
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
 
Set colInstalledPrinters =  objWMIService.ExecQuery _
    ("Select * from Win32_Printer where Local = false")
 
wscript.echo "loop through"
'Loop through all network connected printers on the local machine
For Each objPrinter in colInstalledPrinters
  if objPrinter.ServerName = strOldPrintServer then
    strNewPrtName = Replace(objPrinter.Name,strOldPrintServer, strNewPrintServer)
    ' Removes the old printerconnection
    objNetwork.RemovePrinterConnection objPrinter.Name
    ' Add a new printer pointing to strNewPrintServer
    ' Note! No error handling if printer does not exist, then mapping fails
    objNetwork.AddWindowsPrinterConnection strNewPrtName
    ' If the deleted network printer connection was default, set the new one
    if objPrinter.Default = True then
      objNetwork.SetDefaultPrinter strNewPrtName
    end if
  end if
Next

Open in new window

0
 
LVL 4

Expert Comment

by:ReddUK
ID: 23660709
Choosing a Printer Migration Method:

http://technet.microsoft.com/en-us/library/cc780640.aspx
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Back in July, I blogged about how Microsoft's new server pricing model, combined with the end of the Small Business Server package, would result in significant cost increases for many small businesses (see SBS End of Life: Microsoft Punishes Small B…
Microsoft has released remote PowerShell capabilities to all commercial Office 365 customers. So you can be controlled via PowerShell and not from the Office 365 admin center Download Windows PowerShell Module for Lync Online http://www.micros…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question