Skip to content

Real Life Scenarios

Dalmiro edited this page May 6, 2016 · 5 revisions

###Deleting offline Targets/Machines from Octopus

$OfflineMachines = Get-OctopusMachine -ResourceOnly | ?{$_.Status -eq "Offline"}

#Get offline machines from a specific environment
#$OfflineMachines = Get-OctopusMachine -ResourceOnly -EnvironmentName MyEnvironmentName | ?{$_.Status -eq "Offline"}

Remove-OctopusResource -Resource $OfflineMachines #add -Force to avoid being prompted for each target
Clone this wiki locally