Created
January 21, 2015 18:15
-
-
Save Dalmirog-zz/8367e7b8b0711f2f941a to your computer and use it in GitHub Desktop.
Gets count of Octopus Users and Tentacles on a specific instance
This file contains hidden or 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
#make sure this path is correct on your machine | |
Add-Type -Path "C:\Program Files\Octopus Deploy\Tentacle\Newtonsoft.Json.dll" | |
Add-Type -Path "C:\Program Files\Octopus Deploy\Tentacle\Octopus.Client.dll" | |
Add-Type -Path "C:\Program Files\Octopus Deploy\Tentacle\Octopus.Platform.dll" | |
$OctopusURI = "" #i.e "Http://Octopus.MyAwesomeCompany.com" | |
$apikey = "" #i.e "API-7CH6XN0HHOU7DDEEUGKUFUR1K" | |
$endpoint = new-object Octopus.Client.OctopusServerEndpoint "$($OctopusURI)","$($apikey)" | |
$repository = new-object Octopus.Client.OctopusRepository $endpoint | |
$machines = $repository.Machines.FindAll() | |
$Users = $repository.Users.FindAll() | |
Write-output "Users - $($Users.count)" | |
write-output "Tentacles - $($machines.count)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment