CmdID

CmdID / PowerShell / Cmdlets / Format

Format-Wide

Formats objects as a wide table that displays only one property of each object. PowerShell reference

From the PowerShell reference 10 parameters Alias fw

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Formats objects as a wide table that displays only one property of each object. The Format-Wide cmdlet formats objects as a wide table that displays only one property of each object. You can use the Property parameter to determine which property is displayed.

Format-Wide [[-Property] <Object>] [-AutoSize] [-Column <int>] [-GroupBy <Object>] [-View <string>] [-ShowError] [-DisplayError] [-Force] [-Expand <string>] [-InputObject <psobject>] [<CommonParameters>]

Format names of files in the current directory

Get-ChildItem | Format-Wide -Column 3Identify

Format names of registry keys

Get-ChildItem HKCU:\software\Microsoft | Format-Wide -Property PSChildName -AutoSizeIdentify

Troubleshooting format errors

PS /> Get-Date | Format-Wide { $_ / $null } -DisplayError #ERR PS /> Get-Date | Format-Wide { $_ / $null } -ShowError Failed to evaluate expression " $_ / $null ". + CategoryInfo : InvalidArgument: (12/21/2018 8:18:01 AM:PSObject) [], RuntimeException + FullyQualifiedErrorId : PSPropertyExpressionErrorIdentify

Its page in the reference: Format-Wide.

Parameters

10 in the PowerShell reference
-AutoSizeAdjusts 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. You cannot use the AutoSize and Column parameters in the same command.
-ColumnSpecifies the number of columns in the display. You cannot use the AutoSize and Column parameters in the same command.
-DisplayErrorDisplays 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-Wide command, and the expressions do not appear to be working.
-ExpandFormats the collection object, as well as the objects in the collection. This parameter is designed to format objects that support the System.Collections.ICollection 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.
-ForceIndicates that this cmdlet overrides restrictions that prevent the command from succeeding, just so the changes do not compromise security. For example, Force will override the read-only attribute or create directories to complete a file path, but it will not attempt to change file permissions.
-GroupByFormats the output in groups based on a shared property or value. Enter an expression or a property of the output. The GroupBy parameter expects that the objects are sorted. Use the Sort-Object cmdlet before using Format-Wide to group the objects. The value of the GroupBy parameter can be a new calculated property. The calculated property can be a scriptblock or a hash table. Valid key-value pairs are: - Name (or Label) - <string> - Expression - <string> or <scriptblock> - FormatString - <string> For more information, see about_Calculated_Properties.
-InputObjectSpecifies the objects to format. Enter a variable that contains the objects, or type a command or expression that gets the objects.
-PropertySpecifies the object property that appears in the display. Wildcards are permitted. If you omit this parameter, the properties that appear in the display depend on the object being displayed. The parameter name Property is optional. You cannot use the Property and View parameters in the same command. The value of the Property parameter can be a new calculated property. The calculated property can be a scriptblock or a hash table. Valid key-value pairs are: - Expression - <string> or <scriptblock> - FormatString - <string> For more information, see about_Calculated_Properties.
-ShowErrorSends errors through the pipeline. This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a Format-Wide command, and the expressions do not appear to be working.
-ViewSpecifies the name of an alternate table format or view. You cannot use the Property and View parameters in the same command.