Filtering narrows shell results to the processes, files, or other objects that match a useful criterion instead of displaying everything retrieved. section 12.0
PowerShell provides two practical filtering approaches:
- Filter left: ask the retrieving cmdlet for matching objects, keeping filtering close to the data source and reducing later work. section 12.1 section 12.6.1
- Filter in the pipeline: pass retrieved objects to Where-Object, which evaluates each object and drops those whose comparison is False. section 12.1 section 12.4
Keep processes using more than 100 MB
Get-Process | Where-Object {$_.WorkingSet -gt 100MB}. The $_ placeholder represents the current process, and WorkingSet identifies the property being compared. Verify property names with Get-Member rather than relying on displayed column headings. section 12.4
Get-Process -Name p*,*s*
Try filtering process names directly with Get-Process -Name p*,*s*. section 12.1
































