Posts

Showing posts with the label Azure Cli2

Azure CLI Vs Powershell?

Answer : Azure CLI is a PowerShell-like-tool available for all platforms. You can use the same commands no matter what platform you use: Windows, Linux or Mac. Now, there are two version Azure CLI. The Azure CLI 1.0 was written with Node.js to achieve cross-platform capabilities, and the new Azure CLI 2.0 is written in Python to offer better cross-platform capabilities. Both are Open Source and available on Github. However, for now, only certain PowerShell cmdlets support use on Linux. Is it targetted for the audience who want to manage Azure IAAS from Linux environment? I think the answer is yes. For a Linux or Mac developer, I think they more likely to use Azure CLI. Both, Azure CLI and the PowerShell package use the REST API of Azure. As one of our Microsoft contacts said: Use whatever you like and you prefer. There are some pros for Azure CLI: Open Source - which has many advantages. It might be developing faster in the future. You can view what is really in...

Azure Cli How To Change Subscription Default

Answer : For Azure CLI 2.0 (preview) I had to use az account set --subscription <name or id> Please try the following: azure account set -s {Subscription Id} That should change the subscription. Try in this way.it worked for me to set Azure PowerShell to a specific Azure Subscription Set-AzContext -SubscriptionId "t666-e251-49ce-a1cd-5c3144"