-
Notifications
You must be signed in to change notification settings - Fork 46
Real Life Scenarios
Dalmiro edited this page May 6, 2016
·
5 revisions
###Deleting offline Targets/Machines from Octopus
You setup a few machines in the cloud, installed the Tentacle client on them and registered them in Octopus. Once you de-provision this machines from the cloud, the Tentacle resource registered in the Octopus server will still be there, and Octopus will still try to connect to the (now deprecated) machine.
Using this combination of Octoposh cmdlets, you can
$OfflineMachines = Get-OctopusMachine -ResourceOnly | ?{$_.Status -eq "Offline"}
#Get offline machines from a specific environment
#$OfflineMachines = Get-OctopusMachine -ResourceOnly -EnvironmentName MyEnvironmentName | ?{$_.Status -eq "Offline"}
#Get Offline machines that share a specific string on their name (i.e "Test_*")
#$OfflineMachines = Get-OctopusMachine -ResourceOnly -MachineName Test_* | ?{$_.Status -eq "Offline"}
Remove-OctopusResource -Resource $OfflineMachines #add -Force to avoid being prompted for each target
Getting Started
Cmdlets & Examples
- Get-OctopusChannel
- Get-OctopusConnectionInfo
- Get-OctopusDashboard
- Get-OctopusDeployment
- Get-OctopusEnvironment
- Get-OctopusFeed
- Get-OctopusLifecycle
- Get-OctopusMachine
- Get-OctopusProject
- Get-OctopusProjectGroup
- Get-OctopusRelease
- Get-OctopusResourceModel
- Get-OctopusServerThumbprint
- Get-OctopusTagSet
- Get-OctopusTeam
- Get-OctopusTenant
- Get-OctopusToolPath
- Get-OctopusToolsFolder
- Get-OctopusToolVersion
- Get-OctopusUser
- Get-OctopusVariableSet
- Install-OctopusTool
- New-OctopusConnection
- New-OctopusResource
- Remove-OctopusResource
- Set-OctopusConnectionInfo
- Set-OctopusReleaseStatus
- Set-OctopusToolPath
- Set-OctopusToolsFolder
- Update-OctopusResource
Advanced Examples
Real Life Scenarios
Release Notes