Previous Topic: Using HelpNext Topic: Using Arcserve RHA PowerShell Commands


Formatting Command Output

In Windows PowerShell, there are several commands that enable you to change the output view:

To change the format of the output from any command, use the pipeline operator (|) to send the output of the command to a Format command.

For example, the following command sends the output of a Get-Scenario command to the Format-Table command. As a result, the data is formatted as a table:

PS>get-scenario |Format-table
ID         Group     Name            Type       Master        State   Sync  AR
--         -----     ----            ----       ------        -----   ----  --
1123633468 Scenarios File Server 1   FileServer 192.168.1.152 Running File  False
1123633497 Scenarios Exchange Server Exchange   192.168.1.152 Running Block True
1123633852 Scenarios File Server 3   FileServer               Unknown File  False
3848963840 Scenarios File Server     FileServer 192.168.1.152 Stopped File  False
3848982942 Scenarios File System 1   FileServer QA99-W2K3-EX8 Running File  False

For more details, use the following commands to read the help for the Format commands:

get-help format-list
get-help format-table
get-help format-wide
get-help format-custom