I have a PowerShell script in a runbook that is changing the numbers of workers on a App Service Plan. As this script is being triggered in different situations, I could be great if the script had a step to verify if the changes have already been made, and this is the case, the script should not be executed.
Current Script
Set-AzAppServicePlan -Name 'ASP-Test-Scale' -ResourceGroupName 'RSG-Test' -Tier PremiumV2 -NumberofWorkers 4 -WorkerSize 'Medium'