Defining a calculated property
A calculated property is defined with a
hash table.
Depending on the
cmdLet where the calculated property is used, one or more of the following key-names are required or optional:
name or label | Specifies the calculated property's name. |
expression | A script block to evaluate the calculated property's dynamic value. |
alignment | Possible values are 'left' , 'right' or 'center' , used in ConvertTo-HTML and Format-Table |
formatstring | |
width | Maximum width of a column, used in ConvertTo-HTML and Format-Table |
depth | |
ascending and/or descending | A boolean value that specifies the ordering. |
Key names can be abbreviated, for example with e
or expr
for expression
.