This guide provides an introduction to Azure Automation and lists resources that you can access to learn and use it. A tutorial is provided to assist you in configuring Azure Automation for first use, importing and running a simple runbook, and then determining the next steps that you will require to import and create more complex and useful runbooks for working with your Azure environment.
What is Azure Automation?
Microsoft Azure Automation provides a way for users to automate the manual, long-running, error-prone, and frequently repeated tasks that are commonly performed in a cloud environment. You can create, monitor, manage, and deploy resources in your Azure environment using runbooks, which are based on Windows PowerShell workflows.
In this video, Eamon O'Reilly and Scott Hanselman introduce Azure Automation service. (Duration: 10:55)
A variety of resources are available for you to learn how to use Azure Automation and create your own runbooks.
- Azure Automation Library provides complete documentation on the configuration and administration of Azure Automation and for authoring your own runbooks.
- Azure PowerShell cmdlets provides information for automation Azure operations using Windows PowerShell. Runbooks use these cmdlets to work with Azure resources.
- Azure Automation Blog provides the latest information on Azure Automation from Microsoft.
- Automation Forum allows you to post questions about Azure Automation to be addressed by Microsoft and the Automation community.
Samples and utility runbooks
Microsoft and the Automation community provide sample runbooks that can help you get started creating your own solutions and utility runbooks that you can use as building blocks for larger Automation tasks. You can either download these runbooks from Script Center or import them directly into Azure Automation. For more details, see Runbook Gallery.
Give us feedback! If you are looking for an Automation runbook solution or integration module, post a Script Request on the Script Center. If you have an idea for a new feature for Automation, post it on User Voice.
This tutorial walks you through the steps to create an automation account and then import a sample "Hello World" runbook into Azure Automation, execute the runbook, and then view its output.
To complete this tutorial, you need an Azure account. If you have not already done so, you can activate your MSDN subscriber benefits or sign up for a free trial.
This tutorial uses a simple runbook that does not require access to Azure resources. See the Next Steps section of this guide for information on configuring authentication in Azure Automation which is required for most runbooks.
High-level steps for this tutorial
- Create Automation Account
- Import Runbook from Runbook Gallery
- Publish Runbook
- Start Runbook
Create an Automation Account
You must have at least one automation account in your Azure Automation environment. For more information, see Automation Accounts in the Automation Library. If you've already created an automation account, you can skip this step.
Log in to the Azure Management Portal.
In the Management Portal, click Create an Automation Account.
On the Add a New Automation Account page, enter a name for the account, and then click the check mark.
Import Runbook from Runbook Gallery
The Runbook Gallery includes sample runbooks that you can download or import directly into your Azure Automation environment.
On the Automation page, click the new account you just created.
Click New > Runbook > From Gallery.
Select the Tutorial category and then Hello World for Azure Automation. Click the right arrow button.
Review the contents of the runbook and then click the right arrow button.
Review the details of the runbook and then click the check mark button.
Before the runbook can be used, it must be published. For more information, see Publishing a Runbook.
When the runbook has finished importing, click Write-HelloWorld.
Click AUTHOR, and then click DRAFT.
You can modify the contents of a runbook in Draft mode. For this runbook, you don’t need to make any modifications.
Click PUBLISH to promote the runbook so it's ready for production use.
When you are prompted to save and publish the runbook, click Yes.
With the runbook imported and published, you can run it and inspect the output. For more information, see Starting a Runbook and Runbook Output and Messages.
With the Write-HelloWorld runbook open, click START.
On the Specify the runbook parameter values page, type a Name that will be used as an input parameter for the Write-HelloWorld.ps1 script, and then click the check mark.
Click JOBS to check the status of the runbook job you just started, and then click the timestamp in the JOB START column to view the job summary.
On the SUMMARY page you can see the summary, input parameters, and output of the job.
- This tutorial uses a simple runbook that does not manage Azure services. Most runbooks will use Azure cmdlets that require authentication to your Azure subscription. You must follow the instructions at Configuring Azure for Management by Runbooks in order to configure your Azure subscription to work with these runbooks.
- Refer to the Resources listed above for information on obtaining existing runbooks and creating your own runbooks to use in Azure Automation.
- Subscribe to the Azure Automation Blog to stay up to date with the latest information on Azure Automation.