AZ-900 Microsoft Azure Fundamentals 2020

Sign Up Free or Log In to participate!

CLI & PowerShell vs Cloud Shell

Hi, It’s clear to me that we have different ways to manage the Azure Resources with a command line. How can I choose what is the best between an on-premises Azure CLI or PowerShell, when at the same time I can have the same CLI experience on the cloud shell. What is the difference between local installation and cloud CLI? When one is better than the other one?

2 Answers

Tough question indeed. I think one key criteria is about where are your input and output. If you are using CLI to upload large files to Cloud, you may find it convenient to install CLI where your actual files reside. Also if you have CLI scripts which are part of a larger automation tool that runs on-premise you may also want to have your CLI be installed on-premise.

Alessandro Brancolini

Hi, ok really interesting point of view and also make sense. Many thanks

It really depends on how you use those tools and which environment you prefer.

Cloud Shell in Azure Portal is backed by Debian Linux, with PowerShell 7 installed (so you can use both Bash and PowerShell, they’re still on the same machine). The environment is controlled by Azure and you get a pretty decent collection of tools & commands ready for you (and a basic version of Visual Studio Code), and they’re always at the latest stable version.

Cloud Shell is also convenience if you want to quickly do some common  tasks without hassling setting up a proper environment. It can be used on almost every device that has a large-enough screen and a keyboard, not just limited to a regular computer.

However if you need a complex, fully-customizable environment not only for using commands but also for developing complex scripts with an IDE, you would prefer installing Azure CLI/PowerShell on your own computer. You can’t work with Azure AD using command-line from Cloud Shell (not yet anyway). You can’t install other components that you need on the Cloud Shell machine. And you only have a 5 GB cloud drive to store files.

Alessandro Brancolini

Hi, this is also giving me a good pretty baseline to understand also the limitation that I might face with CloudShell. Many thanks

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?