How do I find the Azure PowerShell version?

ManirajSS picture ManirajSS · Dec 8, 2015 · Viewed 37.4k times · Source

I need to find the installed Azure PowerShell version through cmdlets code. How do I find the Azure PowerShell version?

Note: Other than cmdlets code is also welcome.

Answer

juvchan picture juvchan · Dec 8, 2015

This PowerShell cmdlet will get the Azure PowerShell version.

Get-Module -ListAvailable -Name Azure -Refresh

It has a major advantage in which it will be able to return the expected outcome even if the Azure module has not been loaded into the current PowerShell session.

On the contrary, (Get-Module Azure).Version will only work if the Azure module has been loaded into the current PowerShell session before, i.e. by calling any cmdlet from the Azure module in the current PowerShell session, e.g. Get-AzureStorageAccount

enter image description here