Created
February 6, 2015 19:25
-
-
Save Dalmirog-zz/d1610bdb2c99e932d933 to your computer and use it in GitHub Desktop.
Set-OctopusMaintenanceMode
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
$apiKey = "Your API Key" | |
$OctopusURL = "Your Octopus URL" | |
$MaintenanceMode = "True" #Only accepts "True" or "False". Values must be strings | |
$Header = @{ "X-Octopus-ApiKey" = $apiKey } | |
$body = @{IsInMaintenanceMode=$MaintenanceMode} | ConvertTo-Json | |
Invoke-WebRequest -Uri "$OctopusURL/api/maintenanceconfiguration" -Method PUT -Headers $Header -Body $body |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment