Azure Automation Account Runbooks

visibility 45 access_time 5 months ago languageEnglish
Azure Automation Account Runbooks

Azure Automation Account is provided for process automations. Once an automation account is created, you can use it to create runbooks. It currently support 5 runbook types: Graphical (PowerShell via Azure Portal), Graphical PowerShell Workflow (PowerShell Workflow via Azure Portal), PowerShell, PowerShell Workflow and Python.

Azure runbooks usages

Azure runbooks can be used for many different types of automation tasks, for example, start or stop Azure VMs, auto-scale of your Azure SQL Database based on schedule, send emails, backup or delete blobs, etc.

You can find many different templates from the gallery.

This article shows you a simple PowerShell textbook runbook that ping Kontext website every hour to give you a high-level idea about what you can do with Azure automation account.

Create an automation account

The first step is to create an automation account. In Azure Portal, search for Automation Accounts and then click '+ Create' button to create an account. 

Create runbook

  1. Go to Process Automation section of the automation account blade
  2. Click Runbooks to view your existing runbooks or create a new runbook.
  3. Click button '+ Create a runbook'.
  4. Input the details.

  5. Click button 'Create' to complete the creation of the runbook.
  6. In the editor, input the PowerShell scripts:


  7. Click button 'Test pane' to test.

  8. Click button 'Start' to start the test.
  9. Once the test is completed, the result will show as the following screenshot:

  10. Go back to the editor and then click button 'Publish' to publish the runbook.

  11. Once it is published, you can run, edit or delete it from the runbook blade:

Create a scheduler

Once a runbook is created, you can create a scheduler for it.

  1. In the runbook blade, click Schedules under Resources category:

  2. Click button '+ Add a schedule'.
  3. Click 'Link a schedule to your runbook':

  4. Click a schedule or create a new one:

  5. Click button Ok to save the change.
  6. After the schedule is linked, you can see the next run timestamp based on the schedule settings:
  7. Once the runbook is executed, you can find the history in the Jobs section:

  8. Click one job, you will be able to see all the details including output and all other logs:

If you prefer Python, you can also use it to create runbooks. Enjoy process automation with Azure Automation Account!

info Last modified by Raymond 5 months ago copyright This page is subject to Site terms.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

timeline Stats
Page index 0.30
More from Kontext
Access Artifact BuildNumber in Azure DevOps Release Pipeline
visibility 4,599
thumb_up 1
access_time 2 years ago
Access Artifact BuildNumber in Azure DevOps Release Pipeline
Azure DevOps dotnet publish Task Fail for .NET 5 Projects forum
visibility 2,423
thumb_up 0
access_time 9 months ago