Scenario

When you finally decided to take the leap and implement FSLogix Profile Containers you may find yourself wondering, how would you do this without wiping out everyone’s profiles? In an utopia you could simply reset everyone’s profile and pray nobody noticed or didn’t care. Unfortunately that rarely is the case, the Helpdesk will be handling a lot of missing favorites in Internet Explorer and reconfigure application settings and so on…

What you probably already figured out is that you need to convert the Citrix User Profile to the *.vhd/vhdx-disk. Unfortunately there is no built-in function in FSLogix nor is there a tool provided by FSLogix (probably in the near future) to do this BUT, there exists some Powershell-scripts out there and with some tweaks you can convert your profiles successfully and keep your users happy!

Solution

After some research I choose to try out a script created by David Ott. You can check the original post here, or on the FSLogix blogg.

I find this script the most capable, it tests various scenarios, for example: if you already implemented FSLogix Profile Containers to your users, FSLogix would have already created the vhd-disks,  but the script tests this and if that´s the case it will mount the disk and copy the old profile within the disk. Pretty neat!

 

So, how does the script work?

I´m glad you asked! David Ott described it best, I quote:

  1. Gets a list of all UPM profile directories in the root path (that you supply) and displays them to you to select which one(s) you would like to convert via out-gridview
  2. For each profile you select:
    1. Gets the username from the profile path – you will have to edit this part for your environment… explanation in the script
    2. Use the username to get the SID (FSLogix profiles use the username and sid to name the profile folder)
    3. Creates the FSLogix profile folder (if it doesn’t exist)
    4. Sets the user as the owner of that folder, and gives them full control
    5. Creates the .vhd (my default is 30GB dynamic – edit on line 70 if you wish to change it) – if it doesn’t exist (if it does skip 7, 9-10)
    6. Attaches the .vhd
    7. Creates a partition and formats it ntfs
    8. Assigns the letter T to that drive (edit on line 73 if you wish to change that)
    9. Creates the T:\Profile directory
    10. Grants System/Administrators and the user full control of the profile directory
    11. Copies the profile from the UPM path to the T:\Profile directory with /E /Purge – if you are re-running this script on a particular profile it will overwrite everything fresh
    12. Creates T:\Profile\AppData\Local\FSLogix if it doesnt exist
    13. Creates T:\Profile\AppData\Local\FSLogix\ProfileData.reg if it doesn’t exist (this feeds the profilelist key at logon)

The script in all its glory!

 

Please let me know if you find this script helpful or if you have any questions regarding this helpful tool!