File and Print Migration – Originally Posted Feb 8, 2006

It is a pretty common scenario for most companies. The old file and print server (they are usually combined on the same server in most organizations) is getting old and needs to be refreshed with new hardware. This task sounds pretty simple, but it can be a major pain. After all, every client machine has hard coded mappings (unless you use scripts to deploy all of them) for file shares and printer shares.

Print Migrator 3.1 and the File Server Migration Tool (FSMT) can both be downloaded from Microsoft’s website. These two tools can then be used to help migrate from one server to another, which works pretty well. The FSMT is pretty slick in that it also configures the new file server with a DFS root that uses the old file server’s name, so it is almost 100% transparent to clients.

While these tools exist, I find it just as easy to use a manual process

  1. Build New Server 
  2. Create Printers and share them – You can use the print migrator tool to do this, but I prefer to do it manually so that I can update drivers at the same time and test them
  3. Create File Shares – You can use the FSMT to do this, but I prefer to copy the shares key from the registry and import it into the new server
  4. Migrate File data using Robocopy – Make sure you use the /mir switch or the /copyall switch depending on which version you use to get all of the NTFS permissions – I generally use robocopy /e /r:0 /w:0 /copyall /xo
  5. Copy existing logon scripts and then edit them to create new logon scripts with references to the new file server
  6. Create a script to remap home drives to the new file server
  7. Create printer script to change all printers to the new location
  8. Migrate a few test users in a pilot
  9. Use robocopy on a regular basis to keep all content synched
  10. Test, test, and test some more with more pilot users until confident that everything works
  11. Migrate everyone else
  12. Retire old server

The script that I use as part of the logon script to reset the printers follows:

‘HKEY_CLASSES_ROOT (0x80000000)

‘HKEY_CURRENT_USER (0x80000001)

‘HKEY_LOCAL_MACHINE (0x80000002)

‘HKEY_USERS (0x80000003)


‘On Error Resume Next

const HKEY_LOCAL_MACHINE = &H80000002

const HKEY_CURRENT_USER = &H80000001

strComputer = "."

strOldServer1 = "OldServerNameHere"

strNewServer = "NewServerNameHere"

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\" &_

strComputer & "rootdefault:StdRegProv")

strKeyPath = "PrintersConnections"

oReg.EnumKey HKEY_CURRENT_USER, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys

    IF INSTR(1,subkey,strOldServer1,vbTextCompare) Then

        strDeleteKey = strKeyPath + "" + subkey

        oReg.DeleteKey HKEY_CURRENT_USER, strDeleteKey 

        strAddKey = Replace(strDeleteKey,strOldServer1,strNewServer)

        oReg.CreateKey HKEY_CURRENT_USER, strAddKey

        oReg.SetStringValue HKEY_CURRENT_USER, strAddKey, "Provider", "win32spl.dll"

        oReg.SetStringValue HKEY_CURRENT_USER, strAddKey, "Server", "\" & strNewServer


    END IF


I hope this helps the next poor guy that has to do one of these so called simple migrations.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s