Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure CLI vs Powershell?

Not precisely able to understand the merit of Azure CLI on Windows environment.

Is it targetted for the audience who want to manage Azure IAAS from Linux environment?

I thought Powershell core is going to be the way for non-Windows admins. Is PowerShell Core not going to be ported to well on all platforms, to serve the cross-platform audience?

In a nutshell, is it worth learning Azure CLI?

like image 893
Abhijeet Avatar asked Aug 09 '17 08:08

Abhijeet


People also ask

What is the difference between Azure CLI and PowerShell?

Azure CLI has an installer that makes its commands executable in all four shell environments. Azure PowerShell is set of cmdlets packaged as a PowerShell module named Az ; not an executable. Windows PowerShell or PowerShell must be used to install the Az module.

Can we run Azure CLI commands in PowerShell?

You can now run the Azure CLI with the az command from either Windows Command Prompt or PowerShell.

Is PowerShell a CLI?

What is PowerShell and Why is it Useful? Windows PowerShell is a command-line interface for Windows computers. A command-line interface (CLI) is a program for telling your computer to do tasks using typed commands, rather than by clicking pictures on the desktop as in a graphical user interface (GUI).


2 Answers

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.

like image 110
Shui shengbao Avatar answered Oct 14 '22 18:10

Shui shengbao


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:

  1. Open Source - which has many advantages. It might be developing faster in the future. You can view what is really in the Code, the community might or will be bigger, and so on.
  2. Azure CLI can be used with Groovy, Python, Ruby or any other scripting language. It is easier to get good developers for this languages than an experienced PowerShell developer. For example: I took Groovy because of Java. It is easier to use this combination then learning PowerShell scripting....

Currently there is 1 really big positive for PowerShell: there is a huge repository of PowerShell script examples for Azure. BUT: often you have to do it on your own to fit your requirements - therefore an example might be a good starting point - sometimes it is easier to begin from scratch.

My recommendation would be: Use Azure CLI --> For Scripting use the language your company is familiar with.

like image 33
TheShadow Avatar answered Oct 14 '22 17:10

TheShadow