Created on

Azure Local – Azure Virtual Desktop – Image disk shrink


All credits go to Bernhard Frank that have written this script (and others, check out his GitHub repo).
This script can be used to shrink the disk of an image that has been downloaded or in other ways added to CSV on Azure Local for use with Azure Virtual Desktop. Running many session hosts can take up a lot of storage, so we want to optimize this. Link to the script is here: https://github.com/bfrankMS/AzureLocal_AzStackHCI/blob/current_23H2/AVD/YT-Series/customimage/3-optimizeDisk.ps1