Thursday, April 26, 2018

Tips to avoid and resolve common issues in Azure Automation

Azure Automation is a software as a service (SaaS) application that provides a scalable and reliable multitenant environment in which you can use runbooks to automate processes. There are many tricks you would need to know before you could enjoy this feature.


1. The first tip is to handle "Automation Account" creation error. The common issue is the error Classic Run As account creation error like "Classic Run As Creation Error ForbiddenError: The server failed to authenticate the request.".

The way to resolve this is to add the Azure Account as co-administrator or the administrator of the subscription. The procedure is described here.

You can then delete the Classic Run As Creation and then recreate it.

2. The second tip is to handle certificate expiration. Azure automation certificates expire in one year.

You will get error message when it expires. You can renew from the UI or run the powershell to set never expire. The example PowerShell is listed here.  Here are some detailed information.

a. Run PowerShell Login-AzureRmAccount to get "Environment" variable.

b. Run PowerShell to get "SubscriptionId" and "AutomationAccountName".
Install-Module -Name AzureAutomationAuthoringToolkit 
Get-AzureRmAutomationAccount -ResourceGroupName "yourresourcegroupname" 

3. The third tip is to update default modules. The default modules for Azure Automation is old version and may functions may not exist for that version, you need to manually click "Update Azure Modules" in the "Modules". Here is the default modules and you can see most of the modules are in version 1.

Here is the screenshot after updates.

There are few other tips already covered in previous blog.

This link walks you through the pricing model of everything available in Azure.

Here are some documents about Update Management, which uses Log Analytics. 

No comments:

Post a Comment