Skip to content

Instantly share code, notes, and snippets.

@Szeraax
Created December 17, 2015 17:54
Show Gist options
  • Save Szeraax/192d2665217e4593b9fb to your computer and use it in GitHub Desktop.
Save Szeraax/192d2665217e4593b9fb to your computer and use it in GitHub Desktop.
for ($i = 0; $i -gt 5; $++)
{
if ((Get-Service -Computername $s -name Tomcat7).Status -eq "Running")
{
break
}
else
{
Start-Service -Computername $s -name Tomcat7
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment