Try replacing this line:
$VMsWithSnaps = @(Get-VM | Get-Snapshot | Select vm,name,sizemb)
With this:
$VMsWithSnaps = @(Get-VM | Get-Snapshot | Select vm,name,@{N="SizeMB";E={[math]::round($_.SizeMB, 1)}})
Try replacing this line:
$VMsWithSnaps = @(Get-VM | Get-Snapshot | Select vm,name,sizemb)
With this:
$VMsWithSnaps = @(Get-VM | Get-Snapshot | Select vm,name,@{N="SizeMB";E={[math]::round($_.SizeMB, 1)}})