Skip to content

microsoft/arm-debug-deployment-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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).

About

Script to clean up ARM deployment logs

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •