Share via


How to quickly determine the Windows Azure PowerShell Version

How to quickly determine the Windows Azure PowerShell Version

 

The quickest method to determine which Windows Azure PowerShell version you are running is to enable Debugging and then run a Power Shell command.

 

To enable debugging you just need to set $DebugPreference as below:

 

$DebugPreference ='Continue'

 

Example:

PS C:\Windows\System32\WindowsPowerShell\v1.0> $DebugPreference ='continue'

 

Now you can try any Windows Azure PowerShell command and because shell based debugging is enabled the shell will shows the request and response XML data along with all the headers. The one header we need to pay attention is “User-Agent”. In the User-Agent header we will see exactly what PS version is making those PS based REST calls.

 

PS C:\Windows\System32\WindowsPowerShell\v1.0> get-azurelocation

 

DEBUG: ============================ HTTP REQUEST ============================

 

HTTP Method:

 GET

 

Absolute Uri:

 https://management.core.windows.net/9f79930d-18a8-40bc-a136-b592c6939aac/locations

 

Headers:

x-ms-version : 2012-03-01

User-Agent : Windows Azure Powershell/v.0.6.10

 

The PowerShell version is contained within the User-Agent string "Windows Azure Powershell/v.0.6.10"

 

 

To disable debugging mode all you need to do is execute the following command:

 

PS C:\Windows\System32\WindowsPowerShell\v1.0> $DebugPreference ='Silentlycontinue'

Comments

  • Anonymous
    December 22, 2013
    The comment has been removed

  • Anonymous
    March 31, 2014
    -Run "Add-AzureAccount" from your Azure PS session -Install "Fiddler" and then enabled HTTPS decryption -And you should see in Fiddler the USER AGENT version

  • Anonymous
    March 31, 2015
    Even if this post is quite old, a better option is now this simple command : (Get-Module <module name>).Version Major  Minor  Build  Revision -----  -----  -----  -------- 0      8      16     -1 or simply this one : Get-Module Azure ModuleType Version    Name                                ExportedCommands -----------------  ----------    --------                                ---------------------------- Manifest         0.8.16      Azure                               {Add-AzureAccount, Add-AzureApplicationGatewaySslCertifica...

  • Anonymous
    March 31, 2015
    Sorry the first command was more this one : (Get-Module Azure).Version than this one (Get-Module <module name>).Version The result was made with the Azure Module set in place of <module name>...

  • Anonymous
    October 12, 2015
    Azure PowerShell 1.0 Preview is available: azure.microsoft.com/.../azps-1-0-pre