Get-AzAppServicePlan| select name, status,georegion,kind, NumberOfSites, @{n="Size"; e={($_.sku).size}}, @{n="Nodes"; e={($_.sku).capacity}}, @{n="sku name"; e={($_.sku).tier}}, @{n="Apps"; e={$((Get-AzWebApp -AppServicePlan $_).name)}}
(Get-AzAppServicePlan -ResourceGroupName "<resource group name>" -Name "<app service plan name>").Sku.Capacity
az appservice plan show --resource-group "<resource group name>" --name "<app service plan name>" --output jsonc --query "sku.capacity"
Since you are leveraging PremiumV2, the allowed values are 1-30
Set-AzAppServicePlan -ResourceGroupName "<resource group name>" -Name "<app service plan name>" -NumberOfWorkers <1 - 30>
az appservice plan update --resource-group "<resource group name>" --name "<app service plan name>" --number-of-workers <1 - 30>
(Get-AzAppServicePlan -ResourceGroupName "<resource group name>" -Name "<app service plan name>").Sku.Size
az appservice plan show --resource-group "<resource group name>" --name "<app service plan name>" --output jsonc --query "sku.size"
Set-AzAppServicePlan -ResourceGroupName "<resource group name>" -Name "<app service plan name>" -WorkerSize "<Small | Medium | Large>"
az appservice plan update --resource-group "<resource group name>" --name "<app service plan name>" --sku "<P1v2 | P2v2 | P3v2>"
Unfortunately, there isn't a PowerShell to get the available SKUs. Instead, you can get this via a REST call. The documentation for this can be found here:
https://docs.microsoft.com/en-us/rest/api/appservice/appserviceplans/getserverfarmskus#code-try-0