Skip to content

Instantly share code, notes, and snippets.

@DamianMac
Created April 14, 2015 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DamianMac/9615390a98e0cb502571 to your computer and use it in GitHub Desktop.
Save DamianMac/9615390a98e0cb502571 to your computer and use it in GitHub Desktop.
Upload Project Logo to Octopus Deploy with Powershell
$octopusServerUri = "http://serveraddress"
$octopusApiKey = "API-APIKEY"
$projectId = "projects-1"
$filePath = "D:\photos\picture.jpg"
Write-Verbose "Attempting to push a new logo"
$logoUri = "$octopusServerUri/api/projects/$projectID/logo?apikey=$octopusApiKey"
Write-Host $logoUri
$wc = New-Object -typeName System.Net.WebClient
$res = $wc.UploadFile($logoUri, "POST", $filePath)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment