FSLogix–Mounting VHD files with Frxcontext.exe

There may times where you will need to mount a user’s FSLogix profile. In our world we need to cap the size of the profile due to file server disk size limitations. With limiting the size of the profile we need to perform some “cleanup” at times within a users profile to clear space when the profile size reaches the limit. We generate alerts once a size is under 10% of capacity at that moment in time. But if we get an alert during non business hours and the user has long since ended their session we clean up their profile by using the FSLogix  FXContent.exe tool

One can utilize the tool by GUI or using command line. I usually use the command line but I will show you both.

GUI

Need to “install” the tool first

First we open an command prompt and navigate to the  C:\Program Files\FSLogix\Apps folder

frxcontext.exe –install
clip_image004

Once installed you can see the Explorer Context options. Navigate to your FSLogix File share. Right click the profile container and select "Mount for FSLogix Edit".

image

You will see an explorer window appear with the mounted profile and the registry…

image

When you dig down into the “profile” folder you will need permissions

clip_image011

The contexts of the profile appears

clip_image013

To un-mount you will see the icon in the systray, right mouse click and “Unload FSLogix VHD……”

image

Command Line

I usually prefer the command line as it just skips a step of installing the frxcontent.exe –install routine. Whatever preference you choose is up to you.

image

After that the same items will open (profile and registry). To unmount

.\trevor

FSLogix–Containers Search Index

FSLogix builds a search index for our non persistent desktops. A good article from James Kindon explains it well

https://jkindon.com/2020/01/06/fslogix-containers-search-index-considerations-and-troubleshooting/

I created Disk space alerts via Perf Mon (I will show this in later blogs) for FSlogix disk space thresholds. In this example this user the alert fell below the 10% threshold and upon further investigation we found the see this edb file is quite large…

image

Depending on the size of the file you can defrag and reduce it based on the MS article

https://docs.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/larger-windowsdotedb-file

EsentUtl.exe /d %AllUsersProfile%\Microsoft\Search\Data\Applications\Windows\Windows.edb

If successful you will see this…

image

However, there may be times when the container simply does not have enough space….

clip_image004[6]

Based on the JK article listed above one can delete the FRXOutlook_XXXX folder. When we do that the profile needs to be offline or not in use.

Delete the folder in the

%username%\AppData\Roaming\FSLogix\WSearch\FrxOutlook_xxxx

When the user logs back into the desktop the folder will be recreated and the space can be reclaimed

The other option is to expand the user’s VHDX file which I will show how to in a later blog

.\trevor

FSlogix–Converting VHD files to VHDX among other items using FRX.exe

A while back I was looking for a way to convert the VHD file to VHDX format. We had a situation where the initial build of FSLogix was using VHD files as we did not change the Group Policy to use VHDX. I found this article that refers to the FSLogix Utility FRX.EXE.

https://www.vcloudinfo.com/2020/07/best-ways-to-shrink-and-optimize-fslogix-profile-vhd-files.html

In the blog is states you can migrate a large container to a smaller size. So for example we have some 30Gb containers but can migrate the contents to a smaller size. This go me thinking, “Can I migrate a VHD to  VHDX?”

I decided to test. As you can see we have a FSlogix profile for test account jbond. It is a VHD file…..

image

Based on the syntax in the article I applied it to the Test profile jbond….

PS C:\Program Files\FSLogix\Apps> .\frx.exe migrate-vhd -src \\<FileServer>\Profiles\FSLogix\jbond\W10St andard\jbond_S-1-5-21-839522115-682003330-2147125571-227461\Profile_jbond.VHD -Dest \\<FileServer>\Profi les\FSLogix\jbond\W10Standard\jbond_S-1-5-21-839522115-682003330-2147125571-227461\Profile_jbond.VHD

As you can see it executed but had an error message. I cannot find what the error message means….

image

that said, I looked in the path and found that we had in fact created a VHDX file.

image

Once the file is created you have to grant the user access and full control…

image

Then grant them ownership….

image

Testing

I needed to apply a GPP or a reg hack so not to disrupt the production GPO that defined the VHD extension. So in the PVS gold image I applied the hack to use VHDX files to our test based on ….

https://docs.microsoft.com/en-us/fslogix/profile-container-configuration-reference

HKEY_LOCAL_MACHINE\SOFTWARE\FSLogix\Profiles

clip_image012

I logged in and the VHDX profile worked….

image

To be sure I had all the previous settings…background picture, small taskbar and desktop icons….

clip_image016

.\trevor