Powershell for Azure
2 TopicsUnable to upgrade to A7 and A8 using Azure PowerShell Cmdlet -
We are using this Cmdlet: https://docs.microsoft.com/en-us/powershell, to Upgrade the SKU to A7 and A8. We are able to scale to A7 from UI as shown below. On trying with PowerShell Cmdlet, we get the below error: Update-AzureRmPowerBIEmbeddedCapacity : Cannot validate argument on parameter 'Sku'. The argument "A7" does not belong to the set "A1,A2,A3,A4,A5,A6" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again. At line:70 char:121 + ... -Name $pbiEmbCap.Name -ResourceGroupName $resourceGroupName -Sku $sku + ~~~~ + CategoryInfo : InvalidData: (:) [Update-AzureRmPowerBIEmbeddedCapacity], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Azure.Commands.PowerBI.UpdateAzurePowerBIEmbeddedCapacity Is it possible to update the parameter set including A7 and A8, so that we can use the same Cmdlet to upgrade the SKU888Views0likes1CommentUnable to script using Multi-threading
I have one Csv and there are 10 VM and i want to run this script to all the vms in same time (using Multi-threading concept or any other method) not one by one. because if it will run one by one then take a lots of time. $VMNAME=Import-Csv -Path "C:\Test_powershell_03-07-20\09-08-20\demovm.csv" foreach($vm in $VMNAME) { $flag="false" $Subscriptionid =$_.Subscriptionid $Name =$_.VMNAME $ResourceGroupName = $_.RGN $Location=$_.Location Select-AzureRmSubscription -SubscriptionId $Subscriptionid $VMNAME = Get-azurermvm -status -Name $Name -ResourceGroupName $ResourceGroupName $Status = $VMNAME.Statuses[1].DisplayStatus if($Status -eq "vm deallocated") { start-azurermvm -Name $_.VMNAME -ResourceGroupName $_.RGN $flag="true" } if($flag -eq "true") { stop-azurermvm -Name $_.VMNAME -ResourceGroupName $_.RGN -Force } catch { Write-Output $Error[0].Exception.Message } }1.9KViews0likes4Comments