Contact Info

Crumbtrail » Administration » Powershell » Powershell 1.0 » Format-Custom

Format-Custom - Powershell 1.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »


Format output using a customized view

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

-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.
       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.)

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

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

List the Winlogon process using a custom view called MyCustomView :

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