Virtual Machine Scale Set - Management Issue

Copper Contributor

Hello - hoping someone has come across this issue.


I'm having a problem with manual VMSS scaling commands. At the moment I'm trying to grow a scale set using the documented commands, but I have run into issues -


Using the PowerShell command (listed helpfully on this blog:( 


$vmss = Get-AzureRmVmss -ResourceGroupName RMNAME -VMScaleSetName SSNAME

$vmss.Sku.Capacity = 10

Update-AzureRmVmss -ResourceGroupName RMNAME -Name SSNAME -VirtualMachineScaleSet $vmss


I get the error below, setting SSNAME as a variable gives the same result:


Update-AzureRmVmss : 'Name' cannot be null.


I tried the same process via the Azure CLI command:


az vmss scale -g RMNAME -n SSNAME –new-capacity 10


This time i received the below error:


az vmss scale: error: the following arguments are required: --new-capacity


Running the --debug switch shows that the argument appears to be parsed...


Application event 'CommandParser.Parsing' with event data {'argv': ['vmss', 'scale', '-g', 'RMNAME', '-n', 'SSNAME', '–new-capacity', '10']}


So, I'm a little bit stuck - it obviously should work, as its a documented operation. 

The only reason I could think that it may not be working is that I'm trying this against the UK South environment, which is very new, and maybe not all functions are supported. However, this shouldn't result in the azure cli output.


Any assistance appreciated!


1 Reply

have you varified you have permission to get the requested target in powershell.

Apart from that i found this, that also shows you are using the correct method.


Does anyone on your company perhaps have a Action pack or Visual studio enterprise sub, they would have 5-10 support tickets.