How to check version of Azure CLI

Hi recently I faced the issue when Azure updated CLI and on hosted VMs were different versions of CLI.

Simple check over version:
$cliversion = az version --query '\"azure-cli\"' -o tsv
 if ($cliversion -lt "2.49.0") {#old version of CLI
}else{#new version}

About nicoljako

Cofounder Kresalo., sysadmin, architect of IT infrastructures, DevOps
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

Leave a comment