Schedule the Start of a VM in Azure


I used to carry my own personal laptop all around the place, customers, conferences, libraries, etc. In order to have my tool of choice for work. As things have become mobile, the need for a physical device most of the time seems to be unnecessary.

And with the availability of almost "unlimited" resources in the Cloud, I can easily have my own workstation and connect to it wherever I am, whenever I need to.

Having a remote resource hosted in the Cloud has some implications:

  • Cost: I really don't need that much of power, just the standard tools - Office, Visio, Visual Studio, Powershell and the occasional Wireshark, Fiddler, etc. But still has a cost implication

  • Patches and updates: Just as any other physical workstation it does require management

  • Turning ON and OFF: In order to keep costs under control, I need to run this resource as needed, there's no point to have it ON during the weekends or after midnight

  • A local computer to perform a Remote Desktop Connection to the VM in the Cloud. Again, as I have an almost zero policy for carrying computers and tablets, I have a Surface RT at the Office.

Based on these considerations I decided to run a Windows 10 Pro on Azure, a 2 Core, 16 GB RAM with 125 GB of Disk, not SSD as it's more expensive and Word doesn't run faster on it. It's a Standard D11 in the VM Definition Size

Turn it ON and OFF

My logic:

  • I'd rather automate it and forget about it.

  • I arrive at the office and it's already available to work.

  • Not having to log in to the portal or open the app on my iPhone.

  • I like the convenience


  • Create an automation Account

  • Import the runbook from the marketplace

  • Publish the runbook

  • Create a schedule

  • Tie the Runbook to the schedule

Import the Runbook

Give it a name

Go to the newly created runbook and click Edit as shown below:

Publish the Runbook

Create a Schedule

[caption id="" align="aligncenter" width="1023"]

I set up a Monday-Friday recurrence starting at 9 am[/caption]

Tie the Runbook to a schedule. You can create almost any combination of days/dates

Specify the VM parameters

[caption id="" align="alignnone" width="789"]

Specify the Resource group and the VM name. If not VM name is specified, all the VMs in the RG will be started[/caption]


[caption id="" align="aligncenter" width="1860"]

Startup completed as scheduled[/caption]

What about the shutdown?