Today I will not show you any script, but will guide you how to create Azure Automation runbook.
For those who didn’t heard about Azure Automation I strongly recommend to check Microsoft documentation – link.
To make long story short – Azure Automation is the service in Azure cloud, which allow to automate repetitive tasks in your environment using Powershell :).
Not only standard work which can be done on VMs, but it can automate tasks for other services.
How this work?
First of all you should have access to active Azure subscription.
Login to portal.azure.com and in the lookup field type Automation Accounts
Once automation account is created you can create your own runbook. But before that I recommend to check share resources section under your automation account.
This section store information which will be available across all runbooks created under automation account.
From my perspective most usefull resources are:
– Modules – same as in your “computer” version of Powershell. To work with some products you need specific module to be installed. All modules are available in galerry, so insallation is very quick
– Credentials – you shouldn’t store your credentials directly in script. This section store credentials in encrypted way.
– Variables – if you want to use same variable in few runbooks it is the best place to do it.
In next step (if you choose add runbook option) you must provide runbook name (unique in automation account) and runbook type.
Usually I choose Powwershell as a type of runbook, however if you want to use graphic runbook is not very complicated 😉
If you have any questions please leave a comment, we will try to help you 🙂