powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Format-Table



NAME
Format-Table

SYNOPSIS
Formats the output as a table.

SYNTAX
Format-Table [[-Property] ] [-AutoSize] [-DisplayError] [-Expand ] [-Force] [-GroupBy ] [
-HideTableHeaders] [-InputObject ] [-ShowError] [-View ] [-Wrap] []


DESCRIPTION
The Format-Table cmdlet formats the output of a command as a table with the selected properties of the object in ea
ch 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 col
umn headings in the table. To add a calculated property, use the Property or GroupBy parameters.


PARAMETERS
-AutoSize []
Adjusts the column size and number of columns based on the width of the data. By default, the column size and n
umber are determined by the view.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-DisplayError []
Displays errors at the command line.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Expand
Formats the collection object, as well as the objects in the collection. This parameter is designed to format o
bjects that support the ICollection (System.Collections) interface. The default value is EnumOnly.

Valid values 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
Accept pipeline input? false
Accept wildcard characters? false

-Force []
Directs the cmdlet to display all of the error information. Use with the DisplayError or ShowError parameters.
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
Accept pipeline input? false
Accept wildcard characters? false

-GroupBy
Arranges sorted output in separate tables based on a property value. For example, you can use GroupBy to list s
ervices 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 ha
sh table. Valid keys are:

-- Name (or Label)
-- Expression or