Skip to content

Instantly share code, notes, and snippets.

@belotn
Created March 26, 2014 16:06
Show Gist options
  • Save belotn/9786839 to your computer and use it in GitHub Desktop.
Save belotn/9786839 to your computer and use it in GitHub Desktop.
Change Failure settings
get-xaserver |% {
gwmi Win32_Service -ComputerNAme $_.ServerName -Filter 'Name="cpsvc"' |% {
sc.Exe \\$($_.__SERVER) failure $($_.name) reset= 0 actions= restart/60000/restart/60000
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment