Partager via


New Azure Powershell Cmdlets now available.

Microsoft released a new version of the Windows Azure PowerShell Cmdlets out on CodePlex.
https://wappowershell.codeplex.com/releases (2.0).

To read up on the new functionality (and breaking changes), Michael Washam has provided a summary blog post:
https://michaelwasham.com/2011/09/16/announcing-the-release-of-windows-azure-platform-powershell-cmdlets-2-0/

There is a more detailed readme in the download, under the /docs directory when you install the Cmdlets, either as a Module, or a Snap-In.
(I opted for the Module, myself.)

Some of the cool things you can do include interacting with SQL Azure (Setting and removing firewall rules), Windows Azure Diagnostics, Windows Azure Storage (including Analytics) and expanded functionality over getting instance status, creating/deleting affinity groups, and creating new hosted services.  For example, just the ability to enumerate your storage accounts and get their properties are a huge win:

 Import-Module WAPPSCmdlets
 
#Get your local certificate for authentication. 
#[Thumprint  of Service Management API self-signed certificate in your certificate store.]
$cert = Get-Item cert:\CurrentUser\My\57B6CEC1052AB24E9116C66DE7CAE24E78FE5BF0 
 
#SubscriptionID from Windows Azure Developer Portal
$sub = 'f26e43b8-7496-44c6-8611-75771ef15854'
 
#Enumerate Windows Azure Storage Services for this Subscription
$abc = Get-StorageAccount -SubscriptionId $sub -Certificate $cert
 
#Enumerate each storage accounts StorageAccountProperties 
foreach ($objA in $abc){
    Get-StorageAccountProperties -ServiceName $objA.ServiceName -SubscriptionId $sub -Certificate $cert
}
 Gives you a nice enumeration of info you can utilize quickly:

Description : Eric Golpe XStorage Account

AffinityGroup : Chicago

Location : North Central US

Label : EricGol XStore

ExtensionData : System.Runtime.Serialization.ExtensionDataObject

Description :

AffinityGroup :

Location : Southeast Asia

Label : eswat

ExtensionData : System.Runtime.Serialization.ExtensionDataObject

Description : Silverlining Storage

AffinityGroup :

Location : North Central US

Label : silverlining

ExtensionData : System.Runtime.Serialization.ExtensionDataObject

So, what are you waiting for? 
Go-on and get the bits, install it, and fire-up the Windows PowerShell ISE and start power-scripting with Windows Azure!

Have fun!

Eric