Start and Stop Azure VM with Azure Automation
Last week I updated my Azure storage and Virtual machines to Azure Resource Manager. Before that I had the OneShare for MSDN app from Sogeti to start and stop my VM every day so I could start using it without having it to boot manually. Unfortunately the app cannot authenticate with Azure Resource Manager so I have to find another way to make it automatically start and stop.
Azure Automation
The first thing I thought of was Azure Automation, I use that a lot and I have the knowledge of PowerShell to make this happen. I started with creating an Azure Automation resource. While creating this resource I noticed a new option called ‘Create Azure Run As account’. This option creates a service principal in your Azure Active Directory and gives it Contributor rights at the subscription level.