PowerTip: Customize Table Headings with PowerShell

Doctor Scripto

Summary: Learn how to create a custom table heading by using Windows PowerShell.

Hey, Scripting Guy! Question How can I use Windows PowerShell to display a table if the default property name is confusing?

Hey, Scripting Guy! Answer Use a hash table to customize the table properties. The elements of the hash table are Label and Expression (or alias’ L and E).

          In this example, I rename the ProcessName property to Name:

get-process | Format-Table @{L=’name’;E={$_.processname}}, id


Discussion is closed.

Feedback usabilla icon