Skip to content

Archive for

10
Sep

Easily Managing Azure VMs with Azure PowerShell Cmdlets

If you are working with Azure, you need to check out the Azure PowerShell Cmdlets.

powerful + simple = AWESOME !

Here are a few very simple samples that I use to manage my Azure VMs. (There are Cmdlets to cover all of the Azure features and I’ll cover managing Cloud Services in a separate post.)

clip_image002

Figure: “Get-AzureVM“. It lets you easily see what VMs you currently have provisioned (i.e. Are being charged for).

 

clip_image004

Figure: The Stop command let’s you de-provision a VM so you aren’t charged for it while you aren’t using it. I schedule this to run on each of my dev VMs.
        No more $200 Azure bills for me because I forgot to shut down my large instance !

 

clip_image006

Figure: Of course you can start your VMs as well.

 

In case you weren’t sold… here is a list of a few of my other favourites.

Add-AzureWebRole

Restart-AzureVM

Add-AzureWorkerRole

Restart-AzureWebsite

Get-AzureRole (List your roles)

Set-AzureDeployment

Get-AzureService (List cloud services)

Set-AzureRole (Sets the # of instances)

Get-AzureStorageBlob

Set-AzureService

Get-AzureVM (Get VM info)

Show-AzurePortal

Get-AzureWebsite

Show-AzureWebsite

Get-AzureWebsiteDeployment

Start-AzureVM

Get-AzureWebsiteLocation

Start-AzureWebsite

Move-AzureDeployment (staging->prod!)

Stop-AzureVM

New-AzureVM

Stop-AzureWebsite

New-AzureWebsite

 

 

For more info:

Check out MSDN http://msdn.microsoft.com/en-us/library/jj156055.aspx