Overview

In this example I am showing how you can script setting the properties correctly in script to set a Scale operation based on some values you want.

Steps

Create a Test Web App and mock up the rules you want.  You will use this to retrieve the JSON you need to set in your script.

Click on Azure Resource Explorer of the app you created to get to the rules:

image

Navigate to the autoscale rules.  This is located in the resource group of your app under microsoft.insights:

clip_image001[4]

Copy the Properties section to use later.

Click on the Powershell tab to get the example Powershell script (you want the Set properties one).

clip_image001[6]

And simply replace the $PropertiesObject variable with the properties you copied from above!

Let me know if this was Useful!

Leave a comment

Your email address will not be published. Required fields are marked *