Skip to content

Instantly share code, notes, and snippets.

@andrewseward
Created October 28, 2011 13:11
Show Gist options
  • Save andrewseward/1322222 to your computer and use it in GitHub Desktop.
Save andrewseward/1322222 to your computer and use it in GitHub Desktop.
Determining whether a windows service is install with Powershell
$service1 = Get-Service -name "My Service Name" -ErrorAction SilentlyContinue
if (!$service1)
{
"service1 is not installed"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment