Worth posting out there in case you didn’t see the new version of Cerebrata’s Azure Management Cmdlets. You can use this cmdlet to scale up/down your role instances with very minimal code! No need to modify manually from the Portal…
1: Set-RoleInstanceCount -ServiceName $serviceName -Slot $slot -RoleName $roleName -InstanceCount $instanceCount -SubscriptionId $subscriptionId -Certificate $certificate –WaitToComplete
Here is a brief explanation of the parameters:
This is your Windows Azure subscription id which you can get from Windows Azure Portal.
This is the API certificate. This must be uploaded already in Windows Azure Portal.
Name of your hosted service.
Slot (Production or Staging) in which your hosted service is currently deployed.
Name of the role which you wish to scale up or down.
This is the new instance count.
Once this cmdlet is executed, what it does is that it fetches the configuration file for you, updates the “Instances” node with new count value and then updates the configuration file.
Thanks for @gmantri for the update.