Skip to content

Instantly share code, notes, and snippets.

@JohnL4
Created October 22, 2018 17:34
Show Gist options
  • Select an option

  • Save JohnL4/619d17e9498caf8a661b53077affa3d0 to your computer and use it in GitHub Desktop.

Select an option

Save JohnL4/619d17e9498caf8a661b53077affa3d0 to your computer and use it in GitHub Desktop.
List Windows services matching a string
get-service | ? {$_.Name -match 'allscripts|sunrise|helios' -or $_.DisplayName -match 'allscripts|sunrise|helios'}
<# Could maybe create a string variable w/the regexp so we don't have to type it twice. #>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment