This is my first post in a series on how to get started with Azure Automations. In this first post we will set up the environment and test our first runbook.
As always there are a few things we need, for this it's only an Azure Subscription and rights to create new services in this subscriptions. That's it. Yep.
Create your first Hello World Powershell Azure Runbook
Step by step instructions:
Login to the Azure Portal and create an Azure Automation by selecting Create a resource and then search for Automation:
Fill in the form:
Everything is pretty self explanatory except for the the Azure Run As Account. The difference from selecting no is basically that you get an Azure AD Application with a service principal you can use for your automations which makes it easier to authenticate your automations. More information here: Update your Automation account authentication with Run As accounts.
Select the automation:
Scroll down to Process Automation and select Runbooks:
Click Add a runbook.
Click Create a new runbook and fill in the form for your new Powershell runbook:
Azure will take you to the following picture where you can start typing code and see all the available modules (and cmdlets available), Runbooks containing all runbooks in the automation and Assets with Credentials, Connections etc:
Lets create our first code snippet:
... and test it by clicking Test Pane and then Start
Now click Publish!
(bonus) To schedule this... impressive function click on Schedule -> Create a new schedule and fill in the form:
Now you can schedule your HelloWorld function ;)
In a near future we will automate using custom credentials.