Skip to content

Instantly share code, notes, and snippets.

@Dalmirog-zz
Last active October 6, 2016 19:34
Show Gist options
  • Save Dalmirog-zz/30bce70886ff4c0c513a8498ba8c5539 to your computer and use it in GitHub Desktop.
Save Dalmirog-zz/30bce70886ff4c0c513a8498ba8c5539 to your computer and use it in GitHub Desktop.
GetEnabledTentacles
$OctopusAPIkey = ""#Octopus API Key
$OctopusURL = ""#Octopus Server URL
$header = @{ "X-Octopus-ApiKey" = $octopusAPIKey }
(Invoke-WebRequest $OctopusURL/api/machines/all -Headers $header).content | ConvertFrom-Json | ?{$_.isdisabled -eq $true}
select * from Machine
where IsDisabled = '0'
#This cmdlet comes from the OSS Module Octoposh (http://octoposh.net/)
Get-OctopusMachine | ?{$_.IsDisabled -eq $false}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment