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

10th August 2023

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!

Posted in Power Automate, Azure

Leave a Reply

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

This will close in 0 seconds