-
Notifications
You must be signed in to change notification settings - Fork 46
Deleting Resources
Dalmiro edited this page Aug 8, 2015
·
16 revisions
If you are looking for a specific example, leave us a question on
Most of the examples to delete resources on using Octoposh involve
- Using the
get-Octopus**
to get the resource you want to delete - Piping the resource object to
Remove-OctopusResource
None of the examples below include the -force
switch to avoid any accidents. If you want to avoid getting prompted every time you delete a resource, pass the switch -Force
to Remove-OctopusResource
###Project Group
Get-OctopusProjectGroup -name "MyProjectGroup" | Remove-OctopusResource -wait
###Project Delete one project
Get-OctopusProject -name "MyProject" | Remove-OctopusResource -wait
Delete all the projects inside a ProjectGroup
Get-OctopusProjectGroup -name "MyProjectGroup" | Get-OctopusProject | Remove-OctopusResource -wait
###Environment
Get-OctopusEnvironment -name "MyEnvironment" | Remove-OctopusResource -wait
###NuGet Feed This example removes the reference of an external NuGet feed from Octopus. It doesnt delete any packages from the NuGet feed itself
Get-OctopusFeed -Name "MyFeed" | Remove-OctopusResource -wait
###Library variable set
Get-OctopusVariableSet -LibrarySetName "MyLibrarySet" | Remove-OctopusResource -wait
###Machine
Get-OctopusMachine -Name "MySQLDatabase" | Remove-OctopusResource -wait
###Lifecycle
Get-OctopusLifecycle -name "MyLifecycle" | Remove-OctopusResource -wait
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