Programmatically Creating Azure Automation Runbook Webhooks Targeting Hybrid Worker Groups

In Azure Automation, you can create a webhook for a runbook and target it to a Hybrid Worker group (as opposed to run on Azure). In the Azure portal, it is pretty easy to configure this ‘RunOn’ property when you are creating the webhook. However, at the time of writing this blog post, it is STILL not possible to specify where the webhook should target when creating it using the Azure Automation PowerShell module AzureRM.Automation (version 3.1.0 at the time of writing). The cmdlet New-AzureRMAutomationWebhook does not provide a parameter where you can specify the webhook “RunOn” target: there are

PowerShell Function to Get Azure AD Token

When making Azure Resource Manager REST API calls, you will firstly need to obtain an Azure AD authorization token and use it to construct the authorization header for your HTTP requests. My good friend Stanislav Zhelyazkov (@StanZhelyazkov) has written a PowerShell function call Get-AADToken as part of the OMSSearch PowerShell module for this purpose. You can find it in the OMSSearch project’s GitHub repo: I have been using this functions in many projects in the past and it served me well. However, the limitation for Stan’s function is that it only works with user principals – you can only generate

This Blog Gets another Facelift

It has been 7 years since I started blogging here. As the technology progresses, I have changed the theme and the blog title few times to make sure it is still relevant and reflecting what my main focus are. The last time I updated the look-and-feel of this blog was back n July 2014 – almost 3 years ago. Over the last year or so, I am not particularly happy with how my blog looks. By having the phrase ‘System Center’ as part of the blog title, it makes me feel being antique, not to mention like many other folks

Upcoming Webinar on OpsMgr and OMS

Two of my good MVP buddies Dieter Wijckmans (@DieterWijckmans) and Thomas Maurer (@ThomasMaurer) will get together and deliver an online webinar sponsored by Savision (@Savision) . The topic is: Combining Monitoring & Analytics with SCOM and OMS. It is scheduled on Thursday 22nd of June 4PM CEST | 10AM EDT | 9AM CDT. If you are interested in SCOM and OMS, I strongly recommend you to register and attend. You can find more information in the registration page HERE

Deploying ARM Templates with Artifacts Located in a Private GitHub Repository

Background I have spent the last few days authoring an Azure Resource Manager (ARM) template. The template is stored in a private GitHub repository. It contains several nested templates, one of which deploys an Azure Automation account with several runbooks. For the nested templates and automation runbooks, the location must be a URI. Therefore the nested templates and the Azure Automation runbooks that I wish to deploy in the ARM templates must be located in location that is accessible by Azure Resource Manager. There are many good examples in the Azure Quickstart Template GitHub repository, for example, in the oms-all-deploy

SharePointSDK Module Updated to v2.1.5

I’ve just released SharePointSDK module version 2.1.5 with a minor bug fix within the New-SPListDateTimeField function. In the old versions, the New-SPListDateTimeField function would fail if the parameter ‘UseTodayAsDefaultValue’ is set to $false. This bug is fixed in v2.1.5. You can find version 2.1.5 at: PowerShell Gallery: GitHub:

Using Postman Invoking Azure Resource Management APIs

When working with REST APIs, Postman ( is a popular tool that needs no further introductions. This week, I’ve been pretty busy working on the upcoming Inside OMS V2 book, and I’m currently focusing on the various OMS REST APIs for the Custom Solutions chapter. I want to use Postman to test and demonstrate how to use the OMS REST APIs. Since most of the ARM based APIs requires oAuth token in the authorization header, I needed to configure Postman to contact Microsoft Graph API in order to generate the token for the API calls. Initially, I thought this would

Programmatically Performing OMS Log Search Against a Large Result Set

When performing OMS log search programmatically, you will encounter an API limitation that will prevent you from getting all the logs from the result set. Currently, if the search does not include an aggregation command, the API call will return maxium 5000 records. This limitation applies to both the OMS PowerShell module (AzureRM.OperationalInsights) and searching directly via the Log Search API. The return response you get from either the Get-AzureRmOperationalInsightsSearchResults cmdlet or the Log Search API, you will get the total number of logs contained in the result set from the response metadata (as shown below), but you will only

Inside OMS book v2 Preview Chapters Release

Over the last few months, Stan, Pete, Anders and I have been very busy with writing the version 2 of the Inside Microsoft Operations Management Suite book. Although we still have few more chapters to finish, we have decided to release 3 preview chapters now. The first preview chapter was released yesterday. It was Chapter 6: Extending OMS Using Log Search ( This chapter was written by myself, and reviewed by my MVP buddy Kevin Greene (@kgreeneit) and Pete himself. This chapter has covered several OMS functionalities that are based on Log search: Saved Searches OMS Computer Groups Custom Fields

Be Cautious When Designing Your Automation Solution that Involves Azure Automation Azure Runbook Workers

Over the last few weeks, it occurred to me twice that I had to change my original design of the automation solutions I was working on because of the limitations of Azure Automation Azure Runbook Workers. Last month, my fellow CDM MVP Michael Rueefli has published an article and explained Why deploying Hybrid Runbook Workers on Azure makes sense. In Michael’s article, he listed some infrastructural differences between Azure runbook workers and the Hybrid runbook workers. However, the issues that I faced that made me to change my design were caused by the functional limitations in Azure runbook workers. Therefore

%d bloggers like this: