Skip to content

Instantly share code, notes, and snippets.

@Dalmirog-zz
Created February 10, 2015 18:07
Show Gist options
  • Save Dalmirog-zz/5c6ed817e0534b424b5e to your computer and use it in GitHub Desktop.
Save Dalmirog-zz/5c6ed817e0534b424b5e to your computer and use it in GitHub Desktop.
Cancel Octopus Task
$OctopusURI = "Your Octopus URI"
$OctopusAPIKey = "Your Octopus APIKey"
$TaskID = "Task ID" #Task ID to cancel asociated with the deployment. e.g "Servertasks-3567"
$Header = @{ "X-Octopus-ApiKey" = $OctopusAPIKey }
Invoke-WebRequest -Uri "$OctopusURI/api/tasks/$TaskID/cancel" -Method Post -Headers $Header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment