Skip to content

September 10, 2013

Easily Managing Azure VMs with Azure PowerShell Cmdlets

by adamstephensen

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

Advertisements
Read more from Azure

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments