Skip to content

Instantly share code, notes, and snippets.

@ekmixon
Forked from signalwarrant/Filter-Left.ps1
Created October 4, 2021 18:07
Show Gist options
  • Save ekmixon/ab0285807f469731382454f601eb7f48 to your computer and use it in GitHub Desktop.
Save ekmixon/ab0285807f469731382454f601eb7f48 to your computer and use it in GitHub Desktop.
Filer-Left.ps1
#1
Get-Service | Where-object { $_.Status -eq 'Running' -and $_.name -like 's*'}
#2
Get-Service -name s*| Where-object { $_.Status -eq 'Running'}
#1
Measure-Command -Expression {Get-Service | Where-object { $_.Status -eq 'Running' -and $_.name -like 's*'}}
#2
Measure-Command -Expression {Get-Service -name s*| Where-object { $_.Status -eq 'Running'}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment