Skip to content

Commit

Permalink
Merge ff99347 into 445eb48
Browse files Browse the repository at this point in the history
  • Loading branch information
ader1990 committed Jun 4, 2019
2 parents 445eb48 + ff99347 commit 74daebd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions WinImageBuilder.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,12 @@ function Resize-VHDImage {
}
$FinalDiskSize = ((Get-VHD -Path $VirtualDiskPath).Size/1GB)
Write-Log "Final disk size: $FinalDiskSize GB"

$virtualDiskFileSize = (Get-Item -Path $VirtualDiskPath).Length / 1G
Write-Log "Optimize VHD ${VirtualDiskPath}: file size before optimization is ${virtualDiskFileSize}"
Optimize-VHD $VirtualDiskPath -Mode Full
$finalVirtualDiskFileSize = (Get-Item -Path $VirtualDiskPath).Length / 1G
Write-Log "Optimize VHD ${VirtualDiskPath}: file size after optimization is ${finalVirtualDiskFileSize}"
}

function Check-Prerequisites {
Expand Down

0 comments on commit 74daebd

Please sign in to comment.