Quick Tip: Using Import-Subscription in WAPPSCmdlets 2.2.2

If you find yourself in the position of IT Pro or Dev Ops on the Windows Azure Platform the Windows Azure PowerShell Cmdlets (WAPPSCmdlets) are an invaluable resource to managing services already in the cloud or simply getting your applications deployed.

Recently a new version of the Cmdlets were released offering functionality which will import settings from the publishsettings file [download publishsettings]. To import your Windows Azure Subscriptions for use with the Windows Azure PowerShell Cmdlets run this script:

Import-Subscription D:\PathTo\My.publishsettings

When the Cmdlet has finished executing you’ll notice that the imported subscription has been outputted to the console.

If you’re like me you’ll have access to multiple subscriptions which are reflected in the publishsettings file. However, the Import-Subscription cmdlet only seems to import one subscription (the first one in the file).

To get around this simply comment out the previously imported Subscriptions from the publishsettings file, save, then re-run the Cmdlet.

Happy Clouding!