In today’s Azure Nugget we discuss keeping Azure PowerShell cmdlets updated. It seems like there is a new service announcement or update in Azure just about every day now. With the fast pace of update releases we need to ensure that we keep our Azure PowerShell cmdlets up-to-date so we can take advantage of the new functionality being provided. Azure PowerShell cmdlets are provided so that you can rapidly and consistently deploy and manage resources in Azure. These cmdlets are being updated regularly so we need to make sure we update our workstations as well.
First we need to see what version of the Azure cmdlets we already have installed.
1. Open Windows PowerShell ISE as administrator as run the following command.
1 |
(Get-Module -ListAvailable | Where-Object{ $_.Name -eq 'Azure' }) | Select Version, Name, Author, PowerShellVersion | Format-List |
Here you can see that I am running version 0.9.5. Looks like I am a little behind on this machine.
2. You could also provide your credentials to Azure via the Add-Account cmdlet and run the following command.
1 |
(Get-Module Azure).version |
3. You can find all the latest releases of Azure PowerShell cmdlets on Github. As of this blog the latest release is 0.9.8.1.
4. You can use the Web Platform Installer (WEB PI) to install the module. If you already have the WEB PI installed just open it and you should be on the Spotlight tab. If you don’t have it installed click on the link to install. It will only take a minute to install. If you prefer you can click on the Windows Standalone link which is an msi installer. We will use WEB PI here.
5. Click on the Add button for Microsoft Azure PowerShell. Now you can double-click on the package to verify its version.
6. Now that we can see we have the latest version, click the Install button. Accept the License Agreement by clicking I Accept.
7. The installation and configuration will begin.
8. The install will only take a minute and you should get a successful installation message.
9. Here you can see the product was installed. Click Exit and lets go verify the new version.
10. If your ISE is still open, close and re-open. Repeat step 1 or step 2 to verify.
or
Now that you know just how easy it is to keep your Azure cmdlets updated and where to find the updates, lets go deploy some stuff.
Note: Keep in mind that Azure PowerShell 1.0 was just released in Preview and there is a breaking change between 0.9.8 and 1.0 for all existing ARM PowerShell deployments. If you recall in our scripts we have to switch to ARM using the Switch-AzureMode cmdlet. Well, this is the fix for that and all Azure Resource Manager PS cmdlets will now be referenced as AzureRM moving forward.