Make powering Azure VM’s on and off easy with Power Automate

Are you a user of Azure Windows VM’s? Perhaps you’re a Mac user with one or two tasks to do on Windows every so often like me? Do you find it tedious having to go into the Azure Portal, and locate your VM just… READ MORE [https://lewisdoes.dev/blog/make-powering-azure-vms-on-and-off-easy-with-po
macro photography of water dew of glass
Photo by revac film’s&photography on Pexels.com
In: Low Code Lewis Content 🚀

Are you a user of Azure Windows VM’s? Perhaps you’re a Mac user with one or two tasks to do on Windows every so often like me? Do you find it tedious having to go into the Azure Portal, and locate your VM just to switch it on, and then make your connection from Microsoft Remote Desktop?

In this post, I’ll show you how to make switching your Azure VM’s on and off easy using Power Automate! By the end of this post you’ll know how to setup an automation flow in Power Automate which puts a button in your pocket on an app in your mobile phone that’ll let you switch your VM on and off.

Switch on a VM

So lets first work on a flow to switch on our VM. I’m going to head to Power Automate and create a new button triggered cloud flow.

Now very simply add the start virtual machine step into your flow from the Azure VM connector. This is a premium connector and hence you’ll need premium licensing to make this work.

Now in the step you just added, specify the details of your virtual machine.

Now simply save the flow.

Switch off a VM

Now let’s work on the flow to turn off the same VM. Start by creating another button triggered flow.

Now very simply add the step for power off virtual machine which also comes from the Azure VM connector.

Now specify the details of your VM in the inputs of the flow action you just added.

Finally save the flow.

Mobile app buttons for turning on and off Azure VMs

Now, on your mobile device download and install the Power Automate app and login with the credentials you used to create your flow, or with credentials for someone you’ve shared the flow with.

Now very simply, select the flow on your mobile device that you want to run, which’ll be either the flow to turn on your VM or turn it off, and running that should switch on or off your VM and make it ready to go!

Written by
Lewis Baybutt
Microsoft Business Applications MVP • Power Platform Consultant • Blogger • Community Contributor • #CommunityRocks • #SharingIsCaring
Comments
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to LewisDoesDev.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.