Skip to content

Instantly share code, notes, and snippets.

@adamcrews
Created March 28, 2014 16:37
Show Gist options
  • Save adamcrews/9837172 to your computer and use it in GitHub Desktop.
Save adamcrews/9837172 to your computer and use it in GitHub Desktop.
kill stuck mcollective process on windows
exec { 'kill_stuck_mcollective':
command => 'stop-process -force (get-wmiobject Win32_Service -filter \'name="pe-mcollective"\').ProcessID',
unless  => 'if ((get-service "pe-mcollective" | select status).Status -eq "StopPending") { exit 1 }',
provider => powershell,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment