question

Nibbler avatar image
0 Votes"
Nibbler asked

How to verify if changes already have been applied before executing PowerShell

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'

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers