On the path to make something generic, one task is to make as much as possible be variable based. By that I mean one place to define a value as a variable, then use it throughout the pipeline by referencing saied variable . This is good practise because it will make it more robust for…
In my work creating a pipeline for Azure Automation Runbooks I came across a challenge I wanted to share one solution for. My specific challenge was to only import Runbooks that had changed from one PR to the next.Should be easy enough right? Just do: git diff –name-only HEAD~…But wait, I need to do this in the Release…
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…
I did not find the complete story anywhere so I put this together so it would be easier for others to get PS and Intune making nice. I expect some familiarity with Intune and Win32 apps, as I will skip most of the pretext. As most of you know creating Win32 apps one needs to…
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…
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…
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…
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…
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.…
Just a quick one to remind myself as I’m taking in some coffee. If you need to get the set OU filters for the Azure AD Connector, this little Powershell snippet might help:
# Get-ADSyncConnector gets all connector and just find the name of the one you want to use
$ExcludeFilterFileName = "c:\temp\ExcludeFilter.txt"
$IncludeFilterFileName = "c:\temp\IncludeFilter.txt"
$ADConnectorName = "AD Connector Name"
$ADConnector = Get-ADSyncConnector -Name $ADConnectorName
# Assumes that only one partition exist on the connector
$ADConPartition = Get-ADSyncConnectorPartition -Connector $ADConnector -Identifier $ADConnector.Partitions.Identifier.Guid
$ADConPartition.ConnectorPartitionScope.ContainerInclusionList | Out-File -FilePath $IncludeFilterFileName
$ADConPartition.ConnectorPartitionScope.ContainerExclusionList | Out-File -FilePath $ExcludeFilterFileName
Does not seem a way to import as of yet though 🙁 Will update if I find a workaround for this.…