PowerShell を管理者で起動し、以下コマンドを順次実行
$targetvhd = "VHD/VHDXファイルのパス"
Mount-VHD $targetvhd -NoDriveLetter -Readonly
Optimize-VHD $targetvhd -Mode Full
Dismount-VHD $targetvhd