Getting started with Azure Automation
Azure automation is currently in preview so you might not see it in your portal if you haven’t enrolled already. You can enroll for Azure Automation at http://azure.microsoft.com/en-us/services/preview/and also find all other services currently in preview. It’s a good place to frequently check out, fun things emerge here!
So what is Azure Automation? Well, it’s the ability to run PowerShell workflow scripts from Azure, targeted at your Azure resources.
Once you’re enrolled into the preview program you can create your first automation account. An account can be seen as a container that you can fill with runbooks and assets needed by the runbooks. An asset can be for example a certificate allowing you to connect to your (or another) Azure subscription.
Now that you’re enrolled you might want to quickly just test it out, personally I love just getting a feel for things before diving into documenation. You can find example scripts and a how-to at http://azure.microsoft.com/en-us/documentation/articles/automation-create-runbook-from-samples/. One thing to note when creating your runbook is that your scripts name in the portal need to correspond to your workflow name. Ie if your workflow is named “Join-Servers-Domain” your runbook must be named the same.
Looking more at the portal, if you click “runbooks” up top, you can see your runbooks listed with their latest run time and status. This gives you a quick overview without having to look at each runbook individually.
Selecting one specific runbook gives you a chart over how it has ran over the some periods of time. Here you can also drill down into each script run and view script output and any input parameters.
If you opt for “draft” instead you’ll be able to edit your script and insert things from your assets library or other runbooks, allowing for runbooks to interact with each other. Here you can also test your runbook before publishing it.
In my example we have:
- Connection to a subscription
- A certificate which allows us to connect to this subscription (find a guide for that here)
- PowerShell credentials so we don’t have to enter username/password each time
- A module containing PowerShell cmdlets
You can read more about getting started with PowerShell workflows at http://technet.microsoft.com/en-us/library/jj134242.aspx.