There are already a few blog posts available about how to shutdown virtual machines in Azure. I listed some of them at the bottom of this post, but anyhow – I wanted to try it on my own and wrote a short documentation about it.
There are different ways how to automatically shutdown a virtual machine in Azure:
- Automation account (preferred way for existing VMs)
- DevTest-Labs (preferred for development and test environments)
- Install a script on your servers
Update December 1, 2016: there is a new feature available that allows to configure the auto shutdown directly as a virtual machine configuration – see: Auto shutdown Azure virtual machines. If you want to shutdown multiple virtual machines and/or control it from a central point – continue reading this article.