FSLogix / Invoke-FslShrinkDisk

This script will shrink a FSLogix Disk to its minimum possible size
MIT License
155 stars 55 forks source link

VHDX converted from UPD to FSLogix (MBR Partition type IFS) not working #62

Open metre15 opened 3 months ago

metre15 commented 3 months ago

When i run this script i get an error: DiskState : Cannot get partition information

The script looks for "Basic" partition types (which is GPT in this case) When i change the script to look for partition type -eq to "IFS" then everything seems to work.

is it this the right and valid way? can we make this script MBR and GPT compatible at the same time?

JimMoyle commented 3 months ago

I presume you used another tool to create the disks which wasn't from Microsoft/FSLogix. Other tools tend to set the partition information incorrectly, however changing to IFS won't impact the fuctionality of the tool.

Did you know compaction is now built into the product?

metre15 commented 3 months ago

No just the default tooling from Microsoft. (User profile disks, standard config). and later used the FSLogix convert script to convert these UPD to FSLogix profile disks. I have set compaction through GPO. so it will compact at logoff but doesn't seem to work. maybe the same issue of getting the partition of type Basic instead of IFS ? i have found a fork of this script from someone who have edited this script to also look for IFS partition type which seem to work perfectly.

JimMoyle commented 3 months ago

The FSLogix convert script is written by a third party and it's a great script, it just causes this issue.

PyroSoul630 commented 2 months ago

Hopefully this helps. Took me a year to figure out but I finally buckled down and got it working.


For those of you getting issue with "Cannot get partition information" due to IFS partition types: Please go to this branch to get the updated script:

https://github.com/PyroSoul630/FslShrinkDisk-2024/tree/master