Analyze Cmdlet Results

by Jul 11, 2011

There are two great ways to analyze the results a cmdlet returns: you can send the results to Get-Member to get a formal analysis, telling you the properties, methods and data types, and you can send them to Select-Object to view the actual property content to get a feeling where to look for specific information. Check this out:

Get-Process | Get-Member
Get-Process | Select-Object -property * -First 1

Note the use of -First 1: this gets you only the first result which most of the time is sufficient for analysis.

 

Twitter This Tip!
ReTweet this Tip!