What is Azure Cloud Shell?
AZCLI Is an embedded terminal which is can be used within your browser, or even the Azure Mobile app. The Azure Cloud Shell enables you to easily use both Bash and PowerShell directly in the browser or Azure Mobile app.
It is really an Amazing tool, easy to use and execute whatever we need. Managed by Microsoft with no cost!
There are three ways:
- Direct link: Open a browser to https://shell.azure.com.
- Azure portal: Select the Cloud Shell icon on the Azure portal
- Code snippets: On docs.microsoft.com and Microsoft Learn
Which Commands you can Run?
You can use
- Bash or
Features and use cases:
- Manage Exchange Online! PowerShell in Cloud Shell contains a private build of the Exchange Online module. Run Connect-EXOPSSession to get your Exchange cmdlets.
- Deep integration with open-source tooling : Cloud Shell includes pre-configured authentication for open-source tools such as Terraform, Ansible, and Chef InSpec. Try it out from the example walkthroughs. - Read More
- You can use to achieve whatever you need on your environment such as delete VM, Create VM, Modify VM, Shutdown VM, Manage PaaS,DBaaS and a lot of thing you can do using AZCLI
- Download and Upload Files, Azure Cloud Shell includes a feature that allows you to directly upload files from your local file system into the Azure Cloud Shell environment and downloading files from the Azure Cloud Shell
- Key Concepts:
- Cloud Shell runs on a temporary host provided on a per-session, per-user basis
- Cloud Shell times out after 20 minutes without interactive activity
- Cloud Shell requires an Azure file share to be mounted
- Cloud Shell uses the same Azure file share for both Bash and PowerShell
- Cloud Shell is assigned one machine per user account
- Cloud Shell persists $HOME using a 5-GB image held in your file share
- Permissions are set as a regular Linux user in Bash
2- Click on the Cloud Shell icon in the header bar, and it will open the Cloud Shell in a pane at the bottom of the browser
4-Lets try to Export a list of VMs I have on Azure - Using this Script -
5- You can Copy Paste in on AZCLI or just Run it directly
6-Once you Run the script you will get a list of all VMs on your azure Subscription
You have only to Pay for the storage account you used which is less than 1$, As The machine hosting Cloud Shell is free, with a pre-requisite of a mounted Azure Files share.