### Filtering# Some commands accept wild cards in the search or have a filter parameterGet-Service-Namew*,b*#But there's more universal method, based on property namesGet-Service|Where-Object-Filter{$_.Status-eq'running'}#So let's break it down#Where-Object allows to filter out the incoming object based on the comparation operator#Most popular operators are:-eq-Equals-ne-Notequals-gt-Greatherthan-lt-Lessthen-le-Lessthanorequal-ge-Greaterthanorequal-Like-Notlike#There are more many, you can check these help topics:Helpabout_OperatorsHelpabout_Comparison_Operators#$_ is current object; it's what we're piping in our case Get-Service# .Status that follows $_ indicates we're passing only specific property of the Get-Service object, in this case StatusGet-Service|GM
#Let's talk this through this example once againGet-Service|Where-Object-Filter{$_.Status-eq'running'}#We can use an alias Where instead of Where-ObjectGet-Service|Where {$_.Status-eq'running'}#I can also link multiple comparissions together with -and -orGet-Service|Where {$_.Status-eq'stopped'-and$_.Name-like'w*'}### What if I'd like to choose only specific propertiesGet-Service|Select-Object-PropertyDisplayName,Status# I can use alias Select instead Get-Service|Select DisplayName,Status# Also allows to access hidden by default properties# Let's find out the path of the program where it's running from, and when was it lunchedGet-Process|Select *Get-Path|Select Name,Path,StartTime### Always filter left