Skip to content

Instantly share code, notes, and snippets.

@flickerfly
Last active December 14, 2015 19:28
Show Gist options
  • Save flickerfly/5136556 to your computer and use it in GitHub Desktop.
Save flickerfly/5136556 to your computer and use it in GitHub Desktop.
Find a windows service by the account it runs as
$accounts = @("name1","name2")
ForEach ($account in $accounts)
{
Get-WmiObject Win32_Service | where {$_.StartName -like "*$account*"}
} #end foreach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment