Azure Runbook – Tags

Please see the detailed steps to configure it:


  1. Go to your Azure Portal and click on Virtual Machines.
  2. Select the Virtual Machine that you need to start/stop.


  1. Select Tags and then you add a name and a value for the tag. For example, Name: Start Value:

7:00AM and click save, then add another tag to stop, for example, Name: Stop  Value: 5:00PM. Add the same Tags to all the computers you want to Start/Stop.





  1. Copy the tag names and values in one note, you will need that information to configure the runbook.
  2. Go to your Automation Account.





  1. Click on Runbooks Gallery. If filter window appears just click ok.



7. Click on “Shutdown/Start VMs by tag”




  1. Click on “Import”.



  1. Type a Name to the Runbook and click ok:


  1. Click on “Edit”:


11. Click on “Publish” and then click on “yes”


12. Click on “Schedule”


  1. Click on Schedule, Create a new schedule, type a name and then configure the schedule as following image, you can make it recurring and selecting Week you can select only the desired days to start the VMs.
  2. Click on “Create” (Screenshot on next page)



15. Click on “Parameters and run settings”

16. Add the Tag Name and Tag Value that you already added to the VM to Start. Example: TagName: Start TagValue:7:00AM.

17. Shutdown: if you select False then the VM will Start. If you select True the VM will stop.

  1. Click OK.




19. Click “OK” again

The runbook is now created and It will start all the VMs that are tagged with the name and value you selected.

Now you just need to create the runbook to stop the VMs at desire time.

To create the runbook to stop the VM you just need to follow the same steps, but using the Tag Name and Value that you defined to Stop, for example: Tag Name: Stop  Value: 5:00PM and Shutdown: True to stop the VM.

The advantage of use these runbooks is that if you need to add more VMs to start and stop, you just need to add the Tag Name and Value to the desired VM and it will be automatically added to the runbook scope.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s