How to use Azure Cloud Shell for Operations?
In the previous article, we have seen how to connect to Azure Cloud Shell. If you have missed that article then check the article link below.
https://theautomationcode.com/how-to-connect-to-cloud-shell-in-azure-portal/
Apart from installing Azure CLI, you can directly use the Cloud shell to run AZCLI commands on the Bash or the PowerShell Console because both have the pre-installed AZ CLI tool installed.
As explained in the article above (link), when you connect to Azure Cloud Shell, it gives you options for Bash or PowerShell but if you have by mistake chose a wrong one then don’t worry you can switch to the new another console as shown below.
You can run any AZ CLI command inside shell.
Alright we are good upto here but cloud shell purpose isn’t only to run cli commands, there are other options in the console as well. Let’s explore them.
Buttons:
- Switch Mode: You can switch between PowerShell and Bash Mode.
- Restart Cloud Shell: This button will terminate the current session and create a new session.
- Help: Cloud Shell and Azure PowerShell related help. Links will redirect you to the Microsoft website in the new tab.
- Settings: You can change font and text size. There is are very limited fonts.
- Upload/Download Files: Files you can download and upload from and to the cloud shell. This is helpful to run the script from the cloud shell directly.
- Open New Session: This will open a new session for the cloud shell. Like PowerShell’s new profile option.
- Editor: You can directly write the script in the editor and execute it in the Shell. It also allows you to edit any code.
- Web Preview: This feature is helpful to preview the web application before deploying it into an actual test or production environment. When you click on it, it asks you to select the port between 1025-8079 and 8091-49151.
We will see more about this options in the upcoming articles.