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:
    c9353007-540f-4a57-a6ea-d570d3a4179b-image.png
    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