Azure Automation is one of the most useful capabilities of the Azure service. An Azure Automation account helps users automate virtual machines schedules and help optimize resources and save costs. There are different aspects to be considered while using Azure Automation including tasks like creating automation Runbooks and publishing and testing them. Users must also be proficient in dealing with various assets. Automation is one of the most important skill sets to possess in this century.
In combination with cloud technology, it is likely to transform businesses around the world. This writeup is an introduction to Azure Automation, a pioneering technology that speeds up repetitive tasks.
Defining Azure Automation
Azure Automation is a powerful capability integrated into an Azure subscription that enhances businesses’ Azure and non-Azure environment capabilities. Users can execute PowerShell scripts without running a physical or a virtual machine. This capability allows users to deploy their scripts without using a server or a Task Scheduler interval. The risk of exposing credentials is also eliminated as they are saved as assets rather than text files.
When is Azure Automation Used?
Azure Automation can be useful in many scenarios. Stated below are two of the most common scenarios in which Azure Automation is useful.
- Minimal requirement of user interaction for the execution of tasks.
- Repetitive tasks that need to be run frequently with minimal or no change in the execution process.
- Build, deploy, configure, and monitor Virtual Machines and other resources.
While the exact nature of the tasks that can be automated can vary significantly, it is possible to determine the type of tasks that can be automated with Azure Automation with continued use and practice.
Prerequisites for Working with Azure Automation
Azure Automation requires a certain level of technical expertise to be used effectively. Here are some of the important points to note before you start with the utility.
- You must have a working knowledge of Azure.
- Enough technical prowess to read, write and interpret PowerShell scripts for flexibility.
- A system that supports PowerShell 5.1 or above.
How to Login to Azure Automation?
Azure Automation can be used once users are logged into Azure. This can be done either through the Graphical User Interface (GUI) or the Azure PowerShell Module.
There are two ways of logging in via the Graphical User Interface, using the Azure Portal and the Azure Portal Desktop App. While both the GUI methods perform the same actions, the Azure Portal enables access using a web browser while the Azure Portal Desktop App is a dedication application for access.
List of Azure Automation Resources
There are 5 important Azure Automation Resources users must be familiar with.
This option provides users with details about the Azure subscription fees. Users can see details like the cost and validity of their accounts in this section.
The Resource Group provides a method for users to assemble Azure resources like VMs, IP addresses, and DNS Zones in logical categories.
This capability is unique to Azure Automation. It is initially within the Resource Group. It also acts as a logical container like the Resource Group that is specific to Azure Automation.
The Runbook is simply a PowerShell script that is executed on Azure. This is where the entire automation process occurs.
These are items like credentials, variables, and schedules that are stored in the automation account which can be accessed by the Runbooks.
How to Use Azure Automation?
Azure Automation can be accessed from the GUI as well as the PowerShell interface. Let us restrict ourselves to the former approach for the sake of simplicity.
Initiate the process by creating an Automation Account.
- Log in to the Azure Web Portal. Navigate to Create a resource>Azure Marketplace.
- Search for ‘Automation’ on the Azure Marketplace.
- Click on Create one the search result appears.
- Type in the automation account name and subscription being used.
- Create a new resource group by clicking Create new and name it appropriately.
- Click on OK and select the appropriate location.
- Click on Create to confirm the settings.
The newly created Automation Account will be available under All Resources. You can configure Runbooks once you have confirmed the availability of the Automation Account.
- To configure Runbooks, click on Process Automation>Runbooks.
- Click on Browse Gallery in the top menu.
- Looks for Start Azure V2 VM and Stop Azure V2 VM in the search bar and click on import for each of them.
- Name the imported Runbooks, edit and publish them.
Once the state of the VM has turned from New to Published, it is time to schedule it.
The final step is to schedule the Runbooks:
- Click on Link to schedule for the newly created Runbook.
- Add the schedule and specify the appropriate settings.
- Click on Start to trigger the Runbook that has been scheduled.
- Type in the Resourcegroupname and Vmname details and click on OK.
You will have created a Runbook and have scheduled it for automating tasks.
Azure Automation – Use It What It Is Meant For
This brief introduction to Azure Automation should have helped you become familiar with the hidden capabilities in your Azure subscription. While it does serve as a primer, you will have to use your discretion on how and when to use the resource once you are familiar with the applications.
As a Microsoft Gold Partner and a Tier 1 CSP for Azure and Office 365, Apps4Rent can assist you in making the best out of your Azure cloud subscription with 24/7 support via phone, chat, and email.
Contact our Azure consultants to know more about Azure managed services. We also offer over 200 readymade Azure VM images which you can download and use directly from Azure Marketplace.