Welcome to part one of a three part series to get you up and running with Azure Automation.
The end goal is the execution of an Azure Automation run book. These posts put the required components in place with PowerShell.
I'll start with an overview of the process and the posts.
- Create a new user in the Azure Active Directory associated with your subscription (this becomes the Automation Credential)
- Assign the user as co-administrator in the subscription
- Create an Azure Automation Account
- Add an Azure Automation Credential
- Add an Azure Automation Variable
- Create a run book that uses the components from posts one and two
- Test the run book
Right, then… let's do this thing!
Start Me Up
STEP 1: create a new user in the Azure Active Directory and associate it with your subscription. This standard AAD user will become the credential used to run Azure Automation jobs.
Connect to your AAD service with the Azure AD Cmdlets:
Now, create a new AAD user:
New-MsolUser -UserPrincipalName AnneDroid@ninja-injury.com -DisplayName "Anne Droid" -FirstName Anne -LastName Droid -PasswordNeverExpires:$true -StrongPasswordRequired:$true -Password rd1gq!9518MYte"£t7SfaGd7y0yc&
Admire one's handy work:
Get-MsolUser -SearchString "Anne" | Select DisplayName
STEP 2: assign the user as co-administrator in the subscription.
Sadly, there isn't any PowerShell for this (yet)…
In the original portal go to 'SETTINGS'
Then chose 'ADMINISTRATORS'
Now input the newly created account name in the dialogue box that appears after pressing 'ADD'
STEP3: create an Azure Automation Account.
New-AzureAutomationAccount -Name "TheBigBadWolf" -Location "West Europe"
That's it for this post. Join me next week when I'll be adding an Azure Automation Credential (and Variable) to this new Automation Account.
(I'm not sure why I felt the need to write that last word…)