Open 4oo4 opened 2 years ago
THANK YOU!!!!!!
I was able to use this script to finally get all of my Profiles compressed! I would really recommend reviewing this for a new final release.
I am so grateful.
This updated script could also be merged into the repo. It handles IFS file types with ease.
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
This is a solution I found for when disk shrinking fails, and says it cannot get partition information: https://github.com/FSLogix/Invoke-FslShrinkDisk/issues/43#issuecomment-899825827
For some reason,
Mount-DiskImage
passthru will sometimes have a null value for theDiskNumber
property, so this is piped intoGet-DiskImage
to preserve all properties.Partition information (
$partinfo
) would fail silently, because whenGet-Partition -DiskNumber $mountedDisk.Number -ErrorAction Stop
only returns$null
, but does not register as an exception, so thecatch {}
blocks would never fire. Instead, this is now partially handled through if statements.Without these changes, in certain cases the script would execute, but not actually shrink any disks, and it would output that it could not get partition information in the logfile.