AzureFeeds - All your Azure feeds in one place.

Sponsors

Wednesday, April 14, 2010

Quick Status of Your Windows Azure Apps with PowerShell

by Steve Marx via Steve Marx's blog on 4/14/2010 10:26:02 PM

Inspired by David Aiken’s one-liner, I’ve been playing around with what’s possible using PowerShell and the Windows Azure Service Management CmdLets. I thought I’d share two of my own one-liners that help me get the status of all my Windows Azure applications at once.

Here’s the first one-liner:

get-hostedservices -cert $cert -subscriptionid $sub | get-deployment production | where { $_.roleinstancelist -ne $null } | select -expandproperty roleinstancelist | group instancestatus | fl name, count

This counts how many of my instances are Ready, Busy, Initializing, etc. Here’s a sample output:

Name: Ready
Count : 18

Name : Initializing
Count : 1

Here’s the other one-liner I came up with, slightly more complicated:

get-hostedservices -cert $cert -subscriptionid $sub | get-deployment production | where {$_.RoleInstanceList -ne $null} | ft servicename, @{expression={$_.roleinstancelist.count}; label='Instance Count'; alignment='left'}

This one lists all my production deployments along with the total number of instances that deployment has. Here’s a sample output:

ServiceName                             Instance Count
-----------                             --------------
annoysmarx                              4
hwctest                                 2
onebigslide                             4
slupload                                2
smarxblog                               3

Have you played yet with the Windows Azure Service Management CmdLets? Do you have any cool scripts to share? Drop me a line and let me know what you come up with.

email it!bookmark it!digg it!

Original Post: Quick Status of Your Windows Azure Apps with PowerShell

Legal Note

The content of the postings is owned by the respective author. AzureFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on AzureFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us