Skip to content

Instantly share code, notes, and snippets.

@cyberautomate
Created December 17, 2021 23:39
Show Gist options
  • Select an option

  • Save cyberautomate/7f3c241887be13c2e1af830da927970f to your computer and use it in GitHub Desktop.

Select an option

Save cyberautomate/7f3c241887be13c2e1af830da927970f to your computer and use it in GitHub Desktop.
#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