Using an Azure VM is a convenient way to test new software without having to corrupt your own terminal or using more resources for a virtual instance using Virtual Box, VMWare, etc.
As you may already know if a VM is stopped there are no charges for computing cost. However you will still incur a charge for the storage used by the VM (which is significantly less). Using a powershell script to manage the state of these VMs are helpful. I have the shutdown powershell script on a scheduler that runs nightly.
In order to use azure powershell you must do the following:
- Install Azure PowerShell.
- Connect to your subscription within Azure Powershell
Fortunately Microsoft has documented this process in an article located at: http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/#Install
After installing feel free to try the following code (make sure to replace “MY_COMPUTER” with the name of your VM:
Start-AzureVM -ServiceName "MY_COMPUTER" -Name "MY_COMPUTER"
Stop-AzureVM -ServiceName "MY_COMPUTER" -Name "MY_COMPUTER" -Force
Comments