Thursday, November 29, 2018

Moving Azure Application Insights alerts from one app insight to another app insight using Powershell


I was working with a person who works in Microsoft US and helping him as freelancer for Powershell scripting. Recently he had come to me with the task of moving azure App insights alerts/rules from one app insight to another another app insight. He wanted a quick solution since he was having demo with customer in few days. As there was NO straight forward PS scripting approach to accomplish this, I've find a workaround to implement using Management.azure.com token and calling azure internal API to do this operation and it worked like a charm !.

Here is the script which I wrote: