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
- Build New Server
- 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
- 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
- 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
- Copy existing logon scripts and then edit them to create new logon scripts with references to the new file server
- Create a script to remap home drives to the new file server
- Create printer script to change all printers to the new location
- Migrate a few test users in a pilot
- Use robocopy on a regular basis to keep all content synched
- Test, test, and test some more with more pilot users until confident that everything works
- Migrate everyone else
- 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)
'HKEY_CURRENT_CONFIG (0x80000005)
'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 & "\root\default:StdRegProv")
strKeyPath = "Printers\Connections"
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
ELSE
END IF
Next
I hope this helps the next poor guy that has to do one of these so called simple migrations.