Need for Auto Shutdown Feature
- VM prices are being charged when they are in the running status and are even not being used after business hours and during the weekends.
- The cost of Azure VMs can be reduced by turning off the VMs automatically after business hours.
- Azure VMs will be turned on the next working day whenever the team wants to work on the VMs.
Technical Implementation to Enable Auto Shutdown Feature for VM
Add a PowerShell task in the stages of the release pipeline which will work as below,
Github link for PowerShell script
https://github.com/sagu94271/seaa/blob/main/Devops/Powershell/autoshutdownazurevm.ps1
Conclusion
We can save a huge amount by enabling the auto shutdown feature when working with multiple azure VMs.
Feel free to share your feedback :)