Created
March 9, 2021 18:33
-
-
Save signalwarrant/e563a644bc8ce54b6f263a334c965d73 to your computer and use it in GitHub Desktop.
PS-Filtering.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Basic Syntax example | |
| Get-Service | Where-Object Status -eq Running | |
| # Advanced Syntax example | |
| Get-Service | Where-Object {$PSItem.Status -eq 'Running' -and $PSItem.StartType -eq 'Automatic'} | |
| # Same as above | |
| Get-Service | Where-Object {$_.Status -eq 'Running' -and $_.StartType -eq 'Automatic'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment