FSLogix Shrink VHD/VHDX Containers (Scripted Action)
Nerdio Manager has a powerful automation that enables you to save money on FSLogix storage capacity by shrinking the white space inside of FSLogix's VHD/VHDX containers.
As data is added to the VHD/VHDX file, it grows. If the data is later removed, the VHD/VHDX file has more free space but the size of the file does not decrease. This is capacity that you are consuming and paying for but is not utilized.
Nerdio Manager has an Azure runbook scripted action that can take these VHD files in bulk, discover the white space inside them, and shrink them.
To shrink the FSLogix VHD/VHDX containers using a scripted action:
Create the following Global Secure Variables: (See Scripted Actions Global Secure Variables for details.)
FslResourceGroup: The resource group in which the temp VM is created.
FslTempVmVnet: The VNet in which the temp VM is created.
FslTempVmSubnet: The subnet in which the temp VM is created.
FslStorageUser: The storage account key user or AD user with access to the fileshare.
FslStorageKey: The storage account key or AD password.
FslFileshare: The UNC path to the FSLogix profiles share.
Navigate to Scripted Actions > Azure runbooks.
Locate the script called Shrink FSLogix Profiles.
From the action menu, select Run now or Schedule.