--- tags: - "\U0001F6A9purpose/ℹ️documentation" - ⭐topic/⌗shell/powershell --- # Calculated properties in `Select-Object` Calculated properties can be used in `Select-Object` to format results in a particular way: ```powershell Get-ADUser | select GivenName, @{Name='Hello', Expression={'World {0}' -f $_.Surname}} ``` Shortcuts of `n` and `e` can be used for the keys, i.e. ```powershell Get-ADUser | select GivenName, @{n='Hello', e={'World {0}' -f $_.Surname}} ``` ## See also [https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_calculated_properties](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_calculated_properties)