Manage all Modules on classic Azure Automation
Finally Microsoft has added API support to programmatically manage 7.2 runtime version modules on classic azure automation in the Az.Automation module. I have therefore updated the runbooks for managing modules to support both 5.1 and 7.2 modules.The nice thing is that the runbooks can either be 5.1 or 7.2, and still service both module repositories.So…
Azure Automation Runtime Environment Module Management
As Azure Automation Runtime Environment now is public preview, I have released a new version of Powershell module management Runbooks. Finally one can programmatically manage Powershell modules for both 7.x and 5.1 environments.They can be either imported directly from AA through Runbook gallery or just grab them from github. Import-PSGalleryModuleAArte Update-PSGalleryModuleAArte Happy tinkering!
Pester 5 test Powershell code in pipeline
Some time ago I created Pester tests for Azure Automation Runbooks as part of a pipeline to validate code before getting checked into a repo. Though this was pre version 5 of Pester, and as 5 came around there where some changes that had to be done for everything to keep working. I will go…
Update AA module management
Just a quick post, I updated the Import-PSGalleryModulesToAA.ps1 runbook to also handle running on a new Azure Automation account. The runbook will now bring AzureRM.Profile, AzureRM.Automation, AzureRM.Resources up to the latest version before importing other modules. You will need to also set the parameters AutomationAccountName and AutomationResourceGroupName as the logic that automatically discovers the AA account does…
Refactoring AA Solution Onboarding to give Linux some love
So some of us are using the free update management and change management solution offered through Azure Automation. There have been some code in the AA team github repo for some time, though as with all code it degrades over time as dependencies change. This logic seemed to support onboarding both Windows and Linux, and…
Azure Automation: Refactor module update logic
As I had a good go creating logic to handle modules on hybriod workers, I decided to also update some existing code the Automation team has had on their github for awhile. This code has become stale and does not work that good anymore. The team is also deprecating their github soon as it does…
Azure Automation: Update Management Runbook
This will be a quick one. As I was looking for a solution to add Azure VM to update management through Terraform I came up short. Therefore we opted to have Terraform do a web call to trigger a Runbook in Azure Automation. I went spelunking and found that the AA team had already done…
Azure Automation: update them modules redux
I did some work on updating the Update-AzureAHybridWorkerModules script I previously published here. It was a very basic script that only updated modules on hybrid workers that had been installed by using Install-Module. After thinking a bit, and becoming ever increasingly frustrated that we still do not have logic for automatically syncing modules installed in…
Azure Automation runbook logging redux
This time I wanted to show a more comprehensive example from a real life need and how I went about solving it. The challenge we faced was that we had previously set our Azure AD Connector to use the e-mail field in AD to be synced to Azure AD as the UPN. This would have…
Azure Automation runbook logging
For any automation tool, logging is pretty important. Though I would also say readability of the logs is something one should also think about when writing code. The general consensus in AA for logging is that one should use: Write-Error Write-Warning Write-Verbose Write-Output as the accepted ways of moving information to the different log types.…