Execute following steps.
- Shut Down Virtual Server from Hyper V console on Physical Host
- Execute following Power shell command line on Physical Host
- Resize-VHD -Path 'Virual machine folder location path’ -ToMinimumSize
- Reference link (https://docs.microsoft.com/en-us/powershell/module/hyper-v/resize-vhd?view=winserver2012-ps)
- Inspect the Current file size after PS command execution.
- Go to Hyper-V Console, VM properties> Select the Virtual Hard Disk> Click on Edit > Select Compact> Next>Finish and OK.
- Power ON VM Physical Host
- Go to Disk Management and confirm the change.