Coder Social home page Coder Social logo

arm-debug-deployment-cleanup's Introduction

ARM debug deployment clean up script

This script will iterate though all ARM deployments and will clean up those deployments where debugSetting is enabled. It will scan deployments at following scopes:

  • Management groups
  • Subscriptions
  • Resource groups

Note: The user running the script must have permission to delete deployments at each scope. If the user does not have permission to read deployments none will be returned or deleted.

Pre-requisites

Windows Users -

Linux Users -

Usage

Use Connect-AzConnect on powershell to connect to your respective tenant/cloud first (https://docs.microsoft.com/en-us/azure/azure-government/documentation-government-get-started-connect-with-ps). Then run this script via powershell. Note: The script will not delete the deployments unless -ForceDelete switch is passed.

Windows users:

  • Open powershell,
  • Connect to azure with Connect-AzConnect,
  • Execute this script PS C:\> ./Remove-DebugDeployments.ps1 (deployments with debug logs will be displayed but not deleted).
  • Execute with the switch PS C:\> ./Remove-DebugDeployments.ps1 -ForceDelete (deployments with debug logs will be deleted).

Linux users:

  • Open powershell with pwsh command on Terminal,
  • Connect to azure with Connect-AzConnect,
  • Execute this script PS ./Remove-DebugDeployments.ps1 (deployments with debug logs will be displayed but not deleted).
  • Execute with the switch PS ./Remove-DebugDeployments.ps1 -ForceDelete (deployments with debug logs will be deleted).

arm-debug-deployment-cleanup's People

Contributors

bishal-pdmsft avatar bmoore-msft avatar microsoftopensource avatar ninadkavimandan avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.