DevOps | Scripts | Automation

Azure CLI

How to Connect to Cloud Shell in Azure Portal?

Azure CLI or Azure Cloud shell that is the default with the Azure Portal. You can find the Azure Cloud Shell icon next to the search box in Azure Portal as shown below.

Azure Cloud Shell Icon

Once you click on the Icon, it will launch the cloud shell in the same window.

You need to choose one of the options (Bash or PowerShell). You can change the choice later as well. If you have the already storage account created then it will redirect you to the console you selected otherwise you need to create a storage account to run the AZ CLI schema.

Once you are done with the changes, the Cloud shell will automatically authenticate because you are already in Azure Portal.

To switch console to the Bash Mode, click on PowerShell Down arrow and click confirm for the mode change.

Run any command to check if it works properly.

The good thing about the inbuilt cloud shell is, we don’t need to update its version manually. Microsoft takes care of this shell update.

Another approach is, you can directly use the Shell URL to connect to Azure Cloud.

https://shell.azure.com/

Azure Cloud Shell