XenApp 4.5/5.0 to XenApp 6.5 – User Data Migration

Recently I have been involved in a Citrix XenApp migration project for a customer in Auckland. The customer had a XenApp 5.0 Citrix farm which was upgraded to XenApp 6.5 FP1. The user data which included the users’ home drive data and some of the piece that was present in their old profiles needed to be migrated to the new farm. There wasn’t any profile redirection configured with the old user profiles so some of the data needed to be extracted from their existing profiles and copied onto the new shares as well. I used the below script to copy the user data to the new share locations.

To migrate the user data for individual users, run the below script from an administrative command line as below. replace the username with the domain account name of the user you want to migrate the data for. i saved the script file as robocopy_user.cmd

You can name the script anything that you like but need to change the name of the script in StartCopy.cmd file that you will come across below.


set users=%1

REM – Copies all the home folder data to the new location. please amend the source and destination according to your needs
robocopy.exe F:\Users\%users% G:\XAHome\%users% /E /SEC /COPYALL /V /ETA /TEE

REM – Extracts and copies Desktop,Favorites and My Documents contents to the redirected folders in the new home drive folders

robocopy.exe I:\tsprofiles\%users%\Desktop G:\XAHome\%users%\Desktop /E /SEC /COPYALL /V /ETA /TEE

robocopy.exe I:\tsprofiles\%users%\Favorites G:\XAHome\%users%\Favorites /E /SEC /COPYALL /V /ETA /TEE

robocopy.exe “I:\tsprofiles\%users%\My Documents” “G:\XAHome\%users%\My Documents” /E /SEC /COPYALL /V /ETA /TEE

REM- Moves My Videos, My Pictures and My Music folders into the My Documents folder in the new share. this was done to tidy up the new home folder
robocopy.exe “G:\XAHome\%users%\My Videos” “G:\XAHome\%users%\My Documents\My Videos” /E /SEC /COPYALL /V /ETA /TEE /MOVE

robocopy.exe “G:\XAHome\%users%\My Music” “G:\XAHome\%users%\My Documents\My Music” /E /SEC /COPYALL /V /ETA /TEE /MOVE

robocopy.exe “G:\XAHome\%users%\My Pictures” “G:\XAHome\%users%\My Documents\My Pictures” /E /SEC /COPYALL /V /ETA /TEE /MOVE

attrib -s “G:\XAHome\%users%\My Shapes”
attrib -s “G:\XAHome\%users%\My Data Sources”

robocopy.exe “G:\XAHome\%users%\My Shapes” “G:\XAHome\%users%\My Documents\My Shapes” /E /SEC /COPYALL /V /ETA /TEE /MOVE
robocopy.exe “G:\XAHome\%users%\My Data Sources” “G:\XAHome\%users%\My Documents\My Data Sources” /E /SEC /COPYALL /V /ETA /TEE /MOVE

attrib +s “G:\XAHome\%users%\My Documents\My Shapes”
attrib +s “G:\XAHome\%users%\My Documents\My Data Sources”

You can even automate the same script to perform data migration in bulk. There are a extra pieces to get it to work.

There are 3 files; one being the script file as mentioned above ( no changes to that)

  • Robocopy_user.cmd
  • UsersToMigrate.txt
  • StaryCopy.cmd ( you can name it anything that you like)

The UsersToMigrate.txt file contains the Active Directory account names of all the users whom the data need to be migrated.


The StartCopy.cmd is the launcher script that calls the robocopy_user.cmd batch file

for /f %%A in (%1) do “robocopy_user.cmd” %%A


How do you run this thing?

Well, navigate to the location of the scripts and then run the scripts as below


Make sure that you make necessary changes according to your environment before executing the script.

Hope you find it useful and finally I have to thank my colleague Chris for assisting me in setting up this script. He is the “go to guy” when it comes to scripts and its wonderful capabilities. Cheers.

Key Infrastructure XenApp Server Tuning

Hello All,

This article has been taken from the Citrix Knowledge Base article CTX116492


This article describes techniques for tuning key infrastructure servers in a Citrix Presentation Server (XenApp) farm.


To communicate with server farms, the server running the Web Interface contacts the Citrix XML Service through broker servers running on one or more specified servers. This service functions as the contact point to provide least-loaded, and other published application information, to clients and servers running between the server farm, and the server running the Web Interface. The Citrix XML Service is automatically installed with Presentation Server for Windows and Presentation Server for UNIX.

The Key Infrastructure Servers in a Citrix Presentation Server farm are the Zone Data Collector and XML Broker Servers. Having more Zones increases the load on the Zone Data Collectors in all other Zones in the farm because information must be replicated between the Zone Data Collectors in all Zones. Production Zones should not include servers from different physical locations and should not be grouped into a single zone.

Key Infrastructure Server Best Practices

Ensure that the Zone Data Collector has ample (75%) available space on the system drive (for example, a 400GB hard drive should have 400 X 0.75 = 300 or 300 GB available).

To reduce non-essential load on the Key Infrastructure Servers, do not run or point the Access Management (or Presentation Server) Console (running on another computer) to a Zone Data Collector or XML Broker Server.
Failover: Dedicate a Most Preferred Zone Data Collector in each zone.

• These servers should not run published applications.

• A lightly loaded Preferred (Backup) Zone Data Collector server should also be designated for each zone.

• This server should not be a Resource Manager Database Connection Server or Farm Metric Server.

Dedicate at least two XML Broker servers for each Web Interface Site.

• These servers should not run published applications.

• These servers should not be a Resource Manager Database Connection Server or Farm Metric Server.

Zone Data Collector Tuning

Enable the setting, Share Information across zones in the properties of the farm in the Access Management Console.

This decreases application resolution time because the local Zone Data Collector does not have to request the load information for the target zone (where the published application resides) at the time of application resolution.

Decreasing resolution time frees up the IMA service to perform other activities faster.

Fine Tuning Parameters for XML

Configure the tuning parameters on the XML brokers serving each Web Interface site and the Most Preferred and Preferred Zone Data Collector in each zone to increase scalability. These settings can also be made to all servers in the farm.

Registry Changes

Caution! Using the Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of the Registry Editor can be solved. Use the Registry Editor at your own risk. Back up the registry before editing it.

SQL Option: The values below enable timeouts for IMA threads when waiting on a SQL server for information. These values are not present by default.



The value below causes IMA to timeout a connection to SQL if it doesn’t receive a response to a query after 45 seconds.

The value below causes IMA to wait 300 seconds to make another connection to SQL after a timeout occurs.

NOTE: The changes made by the registry settings below are automatically made by IMA on Presentation Server 4.5 with Hotfix Rollup Pack 3 and above. For more information refer to CTX118659 – Best Practices for Installing and Maintaining a Large Farm with Hotfix Rollup Pack 3 for XenApp 5.0 and Presentation Server 4.5


The value below increases the amount of worker threads for the IMA Service from the default value of 8 to 128.

“IsolationWorkQueueThreadCount” =dword:00000080


This document applies to: