First published on MSDN on Sep 12, 2017
A few months ago I wrote this post
and this post where I share the top 8 tips for saving your Azure Account $/£ see
In this post I just want to focus on the methods available to auto-shutdown VMs within Azure.
Using Auto-Shutdown within Portal.Azure.com
This is available to all the ARM-based Azure VMs.
With this feature, setting auto-shutdown can’t be easier simply select the auto-shutdown time and Time Zone in
Go to your VM blade in Azure portal.
Click Auto-shutdown in the resource menu on the left-side.
You will see an auto-shutdown settings page expanded, where you can specify the auto-shutdown time and time zone. You can also configure to send notification to your webhook URL 15 minutes before auto-shutdown. This post illustrates how you can
set up an Azure logic app to send auto-shutdown notification
Azure Automation with Power Shell
by creating a PowerShell script which reads from the Azure metrics API. For more details see
At some point you would call the Virtual Machines API at the right time (and optionally send a notification)
Using 3rd party software such as
. It allows you to set Azure VMs to shutdown based on CPU, Disk, and Network utilization average or maximum values. It also handles sending your team notifications via email and
Stop Azure Virtual Machine using Azure Automation Runbook
Demonstrates stopping all Microsoft Azure Virtual Machine in a specific Azure subscription. The script could be associated with the new Azure Automation Scheduler to stop Virtual Machines at specific time. Great for developers for saving on Azure Compute, if they forget to shut.
Please refer to the following articles for using JSON based templates for managing machines.
Azure Automation – Using JSON formatted tags to create a week schedule for virtual machine star...
Azure Automation scenario: Using JSON-formatted tags to create a schedule for Azure VM start-up...
Example from TechNet script gallery
Azure Automation for Scheduled Start-up and Shutdown of ARM Virtual Machines template on GitHub
If your interested in contributing to Open Source Projects the following may be of interest