The new Powershell cmdlets (documented here: http://msdn.microsoft.com/en-us/library/windowsazure/jj152841) look lovely, but there’s one that appears missing:
Get-OperationStatus -WaitToComplete
Without this my Azure operations (e.g. Set-AzureDeployment) don’t wait for completion.
This makes it hard to know when e.g. a staging instance is running before doing a VIP swap.
Are there any alternatives?
So, after investigation, my initial supposition was partly wrong: calls to the new Powershell cmdlets do wait for successful completion, except for
Set-AzureDeployment -newStatus "Running".This is good, as we no longer need to have calls to
Get-OperationStatusscattered through the script; it’s bad, though, asSet-AzureDeploymentleaves the deployment spinning up.We can call
Get-AzureDeployment, though, and iterate through theRoleInstanceListto figure out what’s going on. Like so: