Sunday, 7 March 2010

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…


  1. Thanks for the tip on running robocopy on the source server. I was getting those access denied errors copy my TS profiles over and this saved me tons of work.

  2. Thank you so much for this write up. The /B arguement worked like a charm. I was migrating home folders to a new server and I was getting ntfs permissions error like crazy. Thanks again.

  3. GSCopy Pro v6.0 (RoboCopy Alternative) with Open File Agent
    GSCopyPro is a single command-line tool (CLI) that can copy, replicate and move files from one folder to another. This folder can be on the same machine/ server or another server elsewhere. What makes GSCopyPro stand out from other competitors is the fact it works on 32-bit as well as 64-bit systems and has no restrictions. It can easily be scheduled to run as a scheduled task and fully automated. GSCopyPro also comes with an open file agent which can copy files that are locked/ opened by other processes. This feature is supported in all windows versions from widows XP/ 2003 and later.
    Go To:>>

  4. This comment has been removed by a blog administrator.