Moving TS Profiles and Home Drives to another server

I recently found myself in the situation of having to move the Terminal Server user profiles and the Home Drives directory from one server to another. There are similar challenges involved to moving Roaming Profiles, because you do not have access rights to the user’s profile directory, so you can’t just copy the data.

In short, you need to use

robocopy /e /b /copyall

to copy the folder from one server to another.
After the files are copied, you should be able to just update the Terminal Server Group Policy with the new locations.

But, let me take you through the hoops I had to go through, just in case you have some of the same issues.

The TSProfiles and HomeDrives resided on a Windows Server 2008 server (AD1) and I wanted to move them to a Windows Server 2003 Server (FS1).

Robocopy is included in Windows Server 2008 so I decided to try to do the copy from the 2008 server like this;

robocopy /e /b /copyall d:\TSProfiles \\fs1\d$\TSProfiles.

This failed with an error:

ERROR: You do not have the Backup and Restore Files user rights.
***** You need these to perform backup copies (/B or /ZB)

Hmmm. Okay, add myself to the Backup Operators group – same problem. Turns out it was our old friend, the UAC. So, run the Command Prompt “As Administrator” and all is fine with robocopy.

Well, sort of – some of the files copied correctly while others gave an error:

ERROR 5 (0x00000005) Copying NTFS Security to Destination Directory xxx
Access us denied.

Now, the files had copied but they didn’t have the correct security, so start again.
A little look on the Internet revealed that there are sometimes problems with Robocopy when copying to another server. So, go to FS1 and copy from there instead. Now, this meant I first had to install Robocopy as it is a 2003 server. Robocopy is part of the Windows Server 2003 Resource Kit.
Once that was done I ran

robocopy /b /e /copyall \\ad1\d$\TSProfiles d:\TSProfiles

and all was well.

Finally, all I had to do was change the Group Policy for  the Terminal Servers to point to the new locations for the Homedrives and the Profiles and log in to each Terminal Server in turn and do a GPUPDATE /FORCE.
In my case, the homedrives and profiles are specified in the Terminal Server Computer policy, not in the user policy applied to the users. More specifically in:

Computer Configuration/Administrative Templates/Windows Components/Terminal Services/Terminal Server/Profiles

This did work seamlessly, to my surprise, and I would expect that with normal roaming profiles you may have more fun…