Skip to content

Instantly share code, notes, and snippets.

@PaulStovell
Last active August 29, 2015 14:00
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 PaulStovell/dccf2e7de64f4d18c36f to your computer and use it in GitHub Desktop.
Save PaulStovell/dccf2e7de64f4d18c36f to your computer and use it in GitHub Desktop.
Listing machines from PowerShell
# Don't forget to change the path below to your copy of Octopus.Client.dll
Add-Type -Path "C:\GitHub\OctopusDeploy\source\Octopus.Client\bin\Octopus.Client.dll"
$endpoint = new-object Octopus.Client.OctopusServerEndpoint "https://demo.octopusdeploy.com","API-RORM5DBGZMOSYGE7OSE5EZPQA"
$repository = new-object Octopus.Client.OctopusRepository $endpoint
$envId = $repository.Environments.FindByName("Production")
$machines = $repository.Environments.GetMachines($envId)
$machines | Format-Table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment