You are here: > PowerShell > PowerShell 1.0 > Format-Table
ActiveXperts Network Monitor 2015 proactively manages network servers, devices, databases and more.

Format-Table - PowerShell 1.0

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Back up your Hyper-V VMs Easy & Fast. 100% built for Hyper-V. Free for 2 VMs, forever.


-property Object[]
       The object properties to display (in order)
       Wildcards are permitted.
       You cannot use -Property and -View in the same command.

       Adjust the column sizes based on the width of the data.
       Ignore any column details in the view.
       Omit column headings from the table.

   -view string
       The name of an alternate format or "view." 
   -groupBy Object
       Format the output in groups based on a shared property or value.
       Display text that exceeds the column width on the next line. 
       By default, text that exceeds the column width is truncated.

       Override restrictions that prevent the command from succeeding, 
       without compromising security. Force will override read-only
       attributes but will not change file permissions.

   -inputObject psobject
       The objects to format. (a variable, command or expression that gets the objects)
   -expand string
       Where string is either EnumOnly (the default), CoreOnly or Both
       'CoreOnly' will format and display properties of the collection object itself, 
       while 'emumOnly' will enumerate and display the object properties. 
       (designed around the ICollection (System.Collections) interface.)

       Display errors at the command line.
       Send errors through the pipeline.

       The common parameters: -Verbose, -Debug,-ErrorAction, -ErrorVariable, -OutVariable.

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}}