Get PowerShell View Definitions

When you write objects to the pipeline in Windows PowerShell, at the end of the pipeline PowerShell’s formatting system handles displaying the results to the console. It accomplishes this by using a set of rules stored in XML configuration files. This is why when you run Get-Process you get a table with a pre-defined set of properties. But sometimes there are alternate views defined. For example, for process objects there is a table view called Priority. Once you know the view name you can use it.

[cc lang=”PowerShell”]
PS C:\> Get-Process | Format-Table -view Priority
[/cc]

The difficult part is finding what alternate views have been defined. For that, you can use my Get-View function. Continue reading