PowerShell Logo Small

Format-List



This is the built-in help made by Microsoft for the command 'Format-List', in PowerShell version 4 - as retrieved from Windows version 'Microsoft Windows 8.1 Enterprise' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Formats the output as a list of properties in which each property appears on a new line.

SYNTAX


Format-List [[-Property] <Object[]>] [-DisplayError] [-Expand <String>] [-Force] [-GroupBy <Object>] [-InputObject <PSObject>] [-ShowError] [-View <String>] [<CommonP
arameters>]



Search powershellhelp.space

DESCRIPTION


The Format-List cmdlet formats the output of a command as a list of properties in which each property is displayed on a separate line. You can use Format-List to form
at and display all or selected properties of an object as a list (format-list *).


Because more space is available for each item in a list than in a table, Windows PowerShell displays more properties of the object in the list, and the property value
s are less likely to be truncated.



<

RELATED LINKS


Online Version: http://go.microsoft.com/fwlink/p/?linkid=293961

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>get-service | format-list



This command formats information about services on the computer as a list. By default, the services are formatted as a table. The Get-Service cmdlet gets objects repr
esenting the services on the computer. The pipeline operator (|) passes the results through the pipeline to Format-List. Then, the Format-List command formats the ser
vice information in a list and sends it to the default output cmdlet for display.








-------------------------- EXAMPLE 2 --------------------------

PS C:\>$a = get-childitem $pshome\*.ps1xml
PS C:\>format-list -InputObject $a



These commands display information about the PS1XML files in the Windows PowerShell directory as a list.

The first command gets the objects representing the files and stores them in the $a variable.

The second command uses Format-List to format information about objects stored in $a. This command uses the InputObject parameter to pass the variable to Format-List,
which then sends the formatted output to the default output cmdlet for display.








-------------------------- EXAMPLE 3 --------------------------

PS C:\>get-process | format-list -property name, basepriority, priorityclass



This command displays the name, base priority, and priority class of each process on the computer. It uses the Get-Process cmdlet to get an object representing each p
rocess. The pipeline operator (|) passes the process objects through the pipeline to Format-List. Format-List formats the processes as a list of the specified propert
ies. The "Property" parameter name is optional, so you can omit it.








-------------------------- EXAMPLE 4 --------------------------

PS C:\>get-process winlogon | format-list -property *



This command displays all of the properties of the Winlogon process. It uses the Get-Process cmdlet to get an object representing the Winlogon process. The pipeline o
perator (|) passes the Winlogon process object through the pipeline to Format-List. The command uses the Property parameter to specify the properties and the * to ind
icate all properties. Because the name of the Property parameter is optional, you can omit it and type the command as: "format-list *". Format-List automatically send
s the results to the default output cmdlet for display.