Skip to content

Instantly share code, notes, and snippets.

@PaulStovell
Last active Aug 29, 2015
Embed
What would you like to do?
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