Skip to content

Instantly share code, notes, and snippets.

@markryd
Created February 11, 2018 23:22
Show Gist options
  • Save markryd/b6341a87f872a8d0cddef6418687bca4 to your computer and use it in GitHub Desktop.
Save markryd/b6341a87f872a8d0cddef6418687bca4 to your computer and use it in GitHub Desktop.
Powershell script to disable ARC on an Octopus project
# You can get this dll from your Octopus Server/Tentacle installation directory or from
# https://www.nuget.org/packages/Octopus.Client/
Add-Type -Path 'C:\Program Files\Octopus Deploy\Tentacle\Octopus.Client.dll'
$apikey = 'API-CHANGEME' # Get this from your profile
$octopusURI = 'http://localhost:8065' # Your server address
$projectName = 'A new project' # The namne of the project you want to disable ARC on
$endpoint = new-object Octopus.Client.OctopusServerEndpoint $octopusURI,$apikey
$repository = new-object Octopus.Client.OctopusRepository $endpoint
$project = $repository.Projects.FindByName($projectName)
$project.AutoCreateRelease = $false
$project.ReleaseCreationStrategy.ChannelId = $null
$project.ReleaseCreationStrategy.ReleaseCreationPackageStepId = $null
$repository.Projects.Modify($project)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment