Created
February 11, 2018 23:22
-
-
Save markryd/b6341a87f872a8d0cddef6418687bca4 to your computer and use it in GitHub Desktop.
Powershell script to disable ARC on an Octopus project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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