FSLogix frx program killing OneDrive

Nick Sutton 161 Reputation points
2022-06-17T15:01:49.883+00:00

I'm using the FSLogix application frx.exe to reduce the size of my users' office profile VHDX file with the command

frx.exe migrate-vhd -src path_to_old.vhdx" -dest path_to_new.vhdx -dynamic=1  

This appears to work fine, I get no errors. and the file size comes down. However, when the user logs in, their OneDrive is a mess. If they try to open files from their desktop or my documents (directories synced with OneDrive) they become corrupted and irretreivable.

The only fix I've been able to find, is to un register their one drive and then re-register it. OneDrive then downloads a copy of all their files and renames the existing files with the hosts name as a suffix. I can then delete all those files with the hosts name suffix and the remaining files are accessible.

Am I doing something wrong? Is there a better way to reducce the size of the VHDX without potentialy losing the users data?

Thanks

Microsoft 365 and Office | OneDrive | For business | Windows
Windows for business | Windows Client for IT Pros | User experience | FSLogix
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nick Sutton 161 Reputation points
    2022-07-18T14:29:17.897+00:00

    For anyone running into the same problem I would advise using diskpart to compress your VHDX files. Just run the following from an elevated command prompt.

    select vdisk file=\\path\to\file.vhdx  
    attach vdisk readonly  
    compact vdisk  
    detach vdisk  
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.