Migrating printers from one server to another

Posted on 2009-02-17
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.
Question by:cabal2791
    LVL 2

    Expert Comment

    Download the Microsoft Print Migrator utility.
    Backup our printers and then restore on your new server.
    Easy as that.
    LVL 2

    Expert Comment

    Sorry only read have your question..
    The second part, use Con2prt.exe to remove/readd the new printers:

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

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

    using /cd option installs as default printer

    Author Comment

    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.
    LVL 2

    Expert Comment

    You can download it in the Zero Administration Kit from microsoft
    Unzip it and you will find con2prt.exe in \i386\tools\
    LVL 6

    Accepted Solution

    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

    Open in new window

    LVL 4

    Expert Comment

    Choosing a Printer Migration Method:

    Featured Post

    Promote certifications in your email signature

    Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

    Join & Write a Comment

    The question has been asked on multiple occasions as to how best to do printing in a remote desktop or terminal services environment.   It seems that this particular question has plagued several people and most especially as Terminal Services, as…
    The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now