Format-Custom

Use a customized view to format powershell output.

Syntax
      Format-Custom [[-property] Object[]] [-inputObject psobject]
         [-view string] [-groupBy Object] [-force] [-expand string]
            [-displayError] [-showError]
               [-depth int] [CommonParameters]

Key
   -property Object[]
       The object properties to display (in order)
       Wildcards are permitted.
       You cannot use -Property and -View in the same command.
        
   -inputObject psobject
       The objects to format. (a variable, command or expression that gets the objects)
        
   -view string
       The name of an alternate format or "view." 
        
   -groupBy Object
       Format the output in groups based on a shared property or value.
        
   -force 
       Override restrictions that prevent the command from succeeding, 
       without compromising security. Force will override read-only
       attributes but will not change file permissions.
        
   -expand string
       Where string is either EnumOnly (the default), CoreOnly or Both
       'CoreOnly' will format and display properties of the collection object itself, 
       while 'emumOnly' will enumerate and display the object properties. 
       (designed around the ICollection (System.Collections) interface.)

   -displayError 
       Display errors at the command line.
        
   -showError 
       Send errors through the pipeline.
        
   -depth int
       The number of columns in the display.

   CommonParameters:
        -Verbose, -Debug,-ErrorAction,-ErrorVariable, -OutVariable.

Examples

List the Winlogon process using a custom view called MyCustomView :

PS C:\>get-process Winlogon | format-custom -view MyCustomView

"You must do the thing you think you cannot do" - Eleanor Roosevelt

Related Powershell Commands:

format-custom - Format output display as defined in additions to the formatter file
format-table - Format the output as a table
format-wide - Format objects as a table of their properties
out-file - Send command output to a file
out-host - Send the pipelined output to the host
update-formatdata - Update and append format data files



Back to the Top

Simon Sheppard
SS64.com