One of the most common PowerShell questions is how to get information returned from commands in the desired output on the screen. In this recipe, we'll take a look at how you can output data from commands and format that information for viewing on the screen.
To change the default output and view the properties of an object in list format, pipe the command to the
Get-Mailbox testuser | Format-List
To view specific properties in table format, supply a comma-separated list of property names as parameters, as shown next when using
Get-Mailbox testuser | Format-Table name,alias
When you run the
Get-Mailbox cmdlet, you only see the