PowerShell Logo Small

Format-List



This is the built-in help made by Microsoft for the command 'Format-List', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' 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 {CoreOnly | EnumOnly | Both}] [-Force] [-GroupBy [<Object>]] [-InformationAction {SilentlyContinue | Stop |
Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-InputObject [<PSObject>]] [-ShowError] [-View [<String>]] [<CommonParameters>]



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 format 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 values 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
representing the services on the computer. The pipeline operator (|) passes the results through the pipeline to Format-List. Then, the Format-List command formats the
service 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 process.
The pipeline operator (|) passes the process objects through the pipeline to Format-List. Format-List formats the processes as a list of the specified properties. 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 operator
(|) passes the Winlogon process object through the pipeline to Format-List. The command uses the Property parameter to specify the properties and the * to indicate 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 sends the results to
the default output cmdlet for display.