In my previous blog I mention the latest version has two module. Well, I was wrong! It’s important that you take the time to read the documentation and pay attention to what’s trending in the social network (such as twitter). I did notice someone tweet about the new Azure module included in this last released: the “AzureResourceManager“. And here’s where the fun begin.
There are three modules:
- AzureResourceManager (Preview)
When executing the “Get-Module -ListAvailable” command you will notice that only 2 will show up: Azure and AzureProfile.
This new module is a “PREVIEW“, and the documentation states “The Azure and Azure Resource Management modules are not designed to be used in the same Windows PowerShell session. To make it easy to switch between them, we have added a new cmdlet, Switch-AzureMode.” Here’s the link to the documentation: http://msdn.microsoft.com/en-us/library/jj554330.aspx
This means that in order to use the new commands from the “AzureResourceManager” you need to run the “Switch-AzureMode” which will prevent you from using the Azure commands such as Get-AzureVM on the same PowerShell session. Now, keep in mind that you can always open another session to keep working with the Azure module commands.
At the same time, If you need to use the command “Import-Module Azure“, you’ll notice that it will give an error telling that it can’t find the module. The trick here is, if you haven’t turned off the PowerShell Module Autoload option, the commands will be available. Here’s a TechNet link on how to Turn-Off the PowerShell Autoload module (not recommended): http://blogs.technet.com/b/heyscriptingguy/archive/2013/02/20/powertip-turn-off-powershell-module-autoload.aspx
This is a bug that have been recently reported to the Microsoft Azure PowerShell team. By default, PowerShell have the Module Autoload “ON” and you will be able to list all the Azure module commands.
So, you can still work with your Azure PowerShell commands and use the “Switch-AzureMode” on another session.
Now you can continue to work with PowerShell Azure command and check out is new (Preview) module AzureResourceManager.
List of the Preview Module AzureResourceManager Cmdlets: