Last active
August 29, 2015 14:00
-
-
Save PaulStovell/dccf2e7de64f4d18c36f to your computer and use it in GitHub Desktop.
Listing machines from PowerShell
This file contains 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
# 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