Automating the shutdown of your Azure VMs


rwagg-white small

Rob Waggoner

MS-Azure_rgb_Blk

I talked about how you can use Powershell to shutdown your VMs in Azure here, I also want to point out a way to use Azure automation to make the same thing happen.  Azure automation allows us to give Azure scripts to execute and we can even define the times these scripts execute.  Think about our normal customers; are they really 24×7 shops?  Or can we help them save money by shutting down some or all of their VMs after hours?

We have a TechNet Gallery and it includes Azure Powershell scripts to automate the shutdown and startup of your Azure VMs.  The Azure Gallery is here, the actual shutdown Runbook was created by a partner and is posted here.  The same partner posted the startup script here.  As we continue to use Azure for our workloads, it does encourage us to look at different ways to accomplish our goals.  Stopping non-essential VMs after hours could save a lot of money in the long run.

Until next time,

Rob

Comments (1)

  1. Noah says:

    Good stuff Rob. After looking for additional flexibility with shutdown scheduling, I put together a similar runbook that uses simple tags in Azure for scheduling shutdown, (like “10PM -> 6AM”). It also handles starting back up again. More details and runbook
    download available:

    https://automys.com/library/asset/scheduled-virtual-machine-shutdown-startup-microsoft-azure

Skip to main content