Powershell vmware sizegb

  • If I run

    get-vm | Get-Snapshot| ?{$_.name -notlike "*veeam*" -and $_.name -and $_.name -notlike "*rest*" -and $_.name -notlike "*repl*"}|select vm,name,description, created, sizegb |ft -AutoSize

    The values returned in the SizeGB column are displayed like:
    Is there a way to limit the decimal points shown?

  • Hashtag vulcansoftware

  • Ever notice that despite being "logical", Vulcans were always emotionally distressed if they didn't use an impractical, illogical level of overprecision that did nothing but satisfy they emotional desire to sound superior?

  • Fixed.

    select vm,name,description,created,@{l='sizegb';e={($_.SizeGB).tostring("#.##")}}

Log in to reply