Migrate/Convert Microsoft User Profile Disks to FSLogix VHD

This post is a part of a Github repo, which contains a Powershell script helping to migrate Microsoft User Profile Disks VHDs to FSLogix.

Pre-requesites

AD Powershell Modules

Install-WindowsFeature RSAT-AD-PowerShell

Migrate UPD VHDs to FSLogix VHDs

  • Copy User Profile Disks VHDs to new folder and share folder e.g to \\fileserver01\uvhd_profiles
  • Create new folder and share folder e.g. at \\fileserver01\fslogix_profiles
  • Adjust variables in Convert-UPDtoFSLogix.ps1
 set $updroot = "\\fileserver01\uvhd_profiles"  
 set $fslogixroot = "\\fileserver01\fslogix_profiles"  
 set $errorlogfolder = "\\fileserver01\uvhd_profiles"  

Disable User Profile Disks on all RDSH

Use Server Manager to disable User Profile Disks on all RDSH.

Or use powershell

Example:

Set-RDSessionCollectionConfiguration -CollectionName "Session Collection 02" -DisableUserProfileDisk -ConnectionBroker "RDCB.Contoso.com"

Install and Configure FSLogix

Download and install FSLogix
https://aka.ms/fslogix_download

Configure FSLogix on all RDSH

Example:

[HKEY_LOCAL_MACHINE\SOFTWARE\FSLogix\Profiles]
"Enabled"=dword:00000001
"VHDLocations"="\\fileserver01\fslogix_profiles"
"VolumeType"="VHDX"
"SizeInMBs"=dword:00000c00
"IsDynamic"=dword:00000001
"LockedRetryCount"=dword:00000018
"LockedRetryInterval"=dword:00000006

FSLogix Documentation

Optional – Convert VHD to VHDX

Pre-Requesites

Check exisiting

Get-WindowsFeature *hyper-v*

Hyper-V-Powershell

Install-WindowsFeature -Name Hyper-V-PowerShell

Convert VHD to VHDX

Convert-VHD TestVHD.vhd -VHDFormat VHDX -DestinationPath C:\temp\VHDs\TestVHDX.vhdx -DeleteSource 

Reference

The script is a modified version from Roger Critz from the Microsoft Tech Community Post

Andreas Fleischmann
follow me