Created
June 9, 2015 15:21
-
-
Save ploegert/722c5abd9fa2cda49ff1 to your computer and use it in GitHub Desktop.
Get the latest Azure Powershell Versions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-WindowsAzurePowerShellVersion | |
| { | |
| [CmdletBinding()] | |
| Param () | |
| ## - CHECK INSTALLED VERSION | |
| Write-Host "`r`nInstalled version: " -ForegroundColor 'Yellow'; | |
| import-module azure | |
| (Get-Module -name "Azure" | Where-Object{ $_.Name -eq 'Azure' }) | Select Version, Name, Author | Format-List; | |
| ## - CHECK WEB PI FOR AVAILABLE VERSION | |
| Write-Host "Available version: " -ForegroundColor 'Green'; | |
| [reflection.assembly]::LoadWithPartialName("Microsoft.Web.PlatformInstaller") | Out-Null; | |
| $ProductManager = New-Object Microsoft.Web.PlatformInstaller.ProductManager; | |
| $ProductManager.Load(); $ProductManager.Products | Where-object { | |
| ($_.Title -like "Microsoft Azure Powershell*") -and ($_.Author -eq 'Microsoft Corporation') | |
| } | Select-Object Version, Title, Published, Author | Format-List; | |
| }; | |
| Get-WindowsAzurePowerShellVersion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment