Microsoft Azure Automation service provides a framework to create and schedule workflows to simplify the repetitive and mundane tasks that Cloud administrators perform with Azure. The workflows are commonly known as run-books.

In this article, we will explore the Microsoft Azure Automation service. In addition, we will walk through the steps for creating and managing run-books.

  1. Discuss Azure Automation
  2. Understand runbook in general
  3. Explain runbook
  4. Create a PowerShell runbook
  5. Discuss the option to set up a runbook
  6. Test and publish the sample runbook code
  7. Run the runbook job and more…

Introduction

We will create a new automation account and a set of credentials to access the automation service. Storing credentials in Azure Automation allows workflows to connect to Azure as the account provided.

To use the Automation feature, Type in the keyword “automation” in the Azure Market place option in the Azure portal.

Pre-requisite:

  1. To do that, you need an Azure subscription
  2. You can set up a subscription with a one-month free trial period. Using the free subscription, you get up to $200 in credits to access most of the Azure services that can be used during the trial period
  3. To set up a free-trial Microsoft subscription account, you need a phone number, and a credit card. After that trial subscription expired, you are still able to access the subscription. However, if you decide to keep the subscription, you can upgrade the subscription and go with a pay-as-you-go subscription

Enable Azure Automation

Let us follow the steps to enable automation service.

  1. I assume that you have set up a subscription

  2. Browse Azure Management Portal: portal.azure.com

  3. Type in the credentials to log in to your subscription

  4. In the search bar, type in the keyword “Automation” and click enter. You can see that the automation accounts services are listed

  5. Select the **Automation Accounts **option

  6. Click the Add icon

  7. Type in the Name, select the Azure subscription for which you want to enable Azure Automation. In addition, select Create Azure Run As account. and then click Create

  8. After completion of the registration process, you will see the automation icon displayed on the left side of the portal

  9. Click Learn More in the Azure automation section to find information to help you get started. You can find the latest documentation on Automation, run a simple tutorial, jump to the Runbook Authoring Guide, and access the Azure forums to discuss and get answers from others about automation

What is the runbook?

Runbooks generally contain step-by-step procedures that define where to start-and-stop, handle requests, contingency plans, and helps to debug the process.

What is an Azure Automation runbook?

Azure Automation runbook encompasses a set of processes and step-by-step procedures that you execute repetitively to support various enterprise tasks. The tasks can include application deployment, resource management, database maintenance, server patching, upgrade, backup management, log management, storage management, user management, and security management.

A runbook allows you to build processes using Windows PowerShell Workflow script. The methodology is now part of the automation runbooks. A runbook is one of the core components for automation that can be used to automate and orchestrate any simple or complex requirement.

The Windows PowerShell Workflow code can be used in runbooks typically leverages automation assets. The other important components of automation include schedules—to schedule the runbooks, variables—to define variables, connections to databases and resources, and authentication components include certificates and credentials.

#azure #powershell

Getting started with Azure Automation
1.15 GEEK