NAME
Format-Table
SYNOPSIS
Formats the output as a table.SYNTAX
Format-Table [[-Property]
[-GroupBy
[] DESCRIPTION
The Format-Table cmdlet formats the output of a command as a table with the selected properties of the object in
each column. The object type determines the default layout and properties that are displayed in each column, but you can use the Property parameter to select the properties that you want to see. You can also use a hash table to add calculated properties to an object before displaying it and to specify the column headings in the table. To add a calculated property, use the Property or GroupBy parameter.PARAMETERS
-AutoSize [
Indicates that the cmdlet adjusts the column size and number of columns based on the width of the data. By default, the column size and number are determined by the view. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -DisplayError [
Indicates that the cmdlet displays errors at the command line. This parameter is rarely used, but can be used] as a debugging aid when you are formatting expressions in a Format-Table command, and the expressions do not
appear to be working. The following shows an example of the results of adding the DisplayError parameter with an expression.PS > Get-Date | Format-Table DayOfWeek,{ $_ / $null } -ShowError DayOfWeek $_ / $null --------- ------------
Wednesday #ERR Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false-Expand
Specifies the format of the collection object, as well as the objects in the collection. This parameter is designed to format objects that support the ICollection (System.Collections) interface. The default value is EnumOnly. The acceptable values for this parameter are:- EnumOnly. Displays the properties of the objects in the collection. - CoreOnly. Displays the properties of
the collection object. - Both. Displays the properties of the collection object and the properties of objects
in the collection. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Force [
Indicates that the cmdlet directs the cmdlet to display all of the error information. Use with the DisplayError or ShowError parameter. By default, when an error object is written to the error or display streams, only some of the error information is displayed. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -GroupBy
Specifies sorted output in separate tables based on a property value. For example, you can use GroupBy to list services in separate tables based on their status.Enter an expression or a property of the output. The output must be sorted before you send it to Format-Table .
The value of the GroupBy parameter can be a new calculated property. To create a calculated, property, use a hash table. Valid keys are:- Name (or Label)
- Expression
or