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.
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:
Navigate to the autoscale rules. This is located in the resource group of your app under microsoft.insights:
Copy the Properties section to use later.
Click on the Powershell tab to get the example Powershell script (you want the Set properties one).
And simply replace the $PropertiesObject variable with the properties you copied from above!
Let me know if this was Useful!