Parameters Correspond to Columns

by Mar 17, 2010

Many Get-*-Cmdlets, such as Get-EventLog or Get-Process, will output data in columns and support parameters named like these columns. So to filter the results, you should just look at the column you want to filter on, then use the parameter named like the column, and add your filter criteria:

Get-EventLog System -EntryType Error
Get-Process -ID $pid