Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 1.0 » Format-Table

Format-Table - Powershell 1.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Format-Table

Description
Format output as a table

Usage


Options


Example(s)
Print information about Windows PowerShell snap-ins in a table:

PS C:\>get-pssnapin | format-table -wrap

Print a list of running processes formatted into groups with the same base priority class:

PS C:\>get-process | format-table -groupby basepriority

Print the winlogon process, including a calculated total running time:

PS C:\>get-process winlogon | format-table ProcessName, @{Label="DD.HH:MM:Seconds"; Expression={(get-date) - $_.StartTime}}

Changing the above for the notepad process, notice that this this will add up the running time for ALL notepad processes currently running:

PS C:\>get-process notepad | format-table ProcessName, `
       @{Label="DD.HH:MM:Seconds"; Expression={(get-date) - $_.StartTime}}