PowerShell Logo Small

Format-List



This is the built-in help made by Microsoft for the command 'Format-List', in PowerShell version 2 - as retrieved from Windows version 'Microsoft® Windows Vista™ Ultimate ' 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] [-Vie
w <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 us
e 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, a
nd the property values are less likely to be truncated.



<

RELATED LINKS


Online version: http://go.microsoft.com/fwlink/?LinkID=113302

REMARKS

<

Examples


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

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



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








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

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



Description
-----------
These commands display information about the PS1XML files in the Windows PowerShell directory as a list. The first command gets the objects repre
senting 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 fo
r display.








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

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



Description
-----------
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 objec
t representing each process. The pipeline operator (|) passes the process objects through the pipeline to Format-List. Format-List formats the pr
ocesses as a list of the specified properties. The "Property" parameter name is optional, so you can omit it.








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

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



Description
-----------
This command displays all of the properties of the Winlogon process. It uses the Get-Process cmdlet to get an object representing the Winlogon pr
ocess. 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.