Convert FSLogix profile to local profile

FSLogix, the defacto profile management solution for Azure Virtual Desktop, allows you to easily roam profiles between different Azure Virtual Desktops.

A solution to convert profiles to FSLogix profiles is available, but for the reverse, I couldn’t find anything.

In some situations, e.g. dedicated VDI’s, a local profile may perform better and reduce infrastructure complexity (no share required). Especially in larger environments with thousands of VDI’s the required performance of the profile share is very high.

I wanted to test converting / migrating back from FSLogix profiles to local profiles on a specific machine, which resulted in a simple PowerShell script that can be executed using Run Command or by an admin on the VM.

It mounts the profile of a given user, copies the data to the local VM, unmounts the profile (so the profile is not deleted!) and sets a bunch of registry keys to properly connect the local profile and disable FSLogix roaming on that VM for that user.

See GitLab

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

7 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Mark D
Mark D
4 months ago

Great script… note that for me, the $profileRemotePath would not populate because “.EndsWith” is case sensitive and my files end in “VHDX”.

I added “ToLower()” to the line so that it can find the file extension name regardless of case as shown below.

$profileRemotePath = (Get-ChildItem $profileRemotePath | where{$_.Name.StartsWith("Profile") -and ($_.Name.ToLower().EndsWith(".vhd") -or $_.Name.ToLower().EndsWith(".vhdx"))}).FullName
Alexsis Brown
Alexsis Brown
11 months ago

Hello

Thank you for this script, I have been trying to find something like this for the last couple of days now. When I attempt to run the script after entering in the required information and running I receive this error message

At C:\Users\browna10\OneDrive – Reed Elsevier Group ICO Reed Elsevier Inc\Desktop\convert-FsLogixProfileToLocalProfile.ps1:41 char:20
+ if(!(Test-Path $profileRemotePath)){
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.TestPathCommand

I’m confused on (Test-Path $profileRemotePath)){ as there is nowhere to enter information that determines what the $profileRemotePath is?

Could you assist me with this please?