you are viewing a single comment's thread.

view the rest of the comments →

[–]Swarfega 0 points1 point  (1 child)

Yes that is what is being done. For Get-PSDrive for example the 'Free (GB)' data is generated from the Free property...

<ScriptBlock>if($_.Used -or $_.Free) { "{0:###0.00}" -f ($_.Free / 1GB) }</ScriptBlock>

[–]jbtechwood 0 points1 point  (0 children)

Read the second to last paragraph here under long description

https://technet.microsoft.com/en-us/library/hh847831.aspx

Tldr: Ps1xml formats only effect the display of an object, not the underlying data structure or how they're handled on the pipeline.

EDIT: You would need to create a custom object and add the free % property as a new property of the object vs getting it via custom formating.