Recently, I’ve been spending some time prototyping the new SharePoint 2013 App Model in my Azure provision SP2013 development environment. I wanted to make sure that i can shut it down or start it up quickly. So PowerShell is of course the answer here.
Small assumption is that the Azure Service Name matches the Virtual Machines. It is possible to have multiple virtual machines provisioned under the same service Name
First, ensure that the valid Azure subscription is attached to the Azure command line session:
If that returns no subscriptions, then use Add-AzureAccount commandlet to add an active subscription.
To start/stop the Azure Virtual Machines I use these commands:
Get-AzureVM -ServiceName <ServiceName> | Start-AzureVM Get-AzureVM -ServiceName <ServiceName> | Stop-AzureVM -Force:$true
I’ll add more commands as i start doing more complex things with Azure dev boxes as I go along.