Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

How to Enable and Connect to Microsoft Azure Cloud Shell

August 11, 2022
in Blog, Microsoft Azure
0
ADVERTISEMENT

Table of Contents

Did you know Azure provides a browser-accessible shell for managing Azure resources? You can use both PowerShell and Bash commands directly in your browser using the Azure Cloud Shell.

In this tutorial, you will learn all about the Azure Cloud Shell, configuring the shell, and additional capabilities included in the shell.

Note To follow along with this tutorial, you will need an Azure subscription with sufficient permissions to manage resources, like Owner or Contributor.

What is Azure Cloud Shell?

Azure Cloud Shell is a browser-based shell command-line experience for managing Azure resources in your tenant. Cloud Shell supports both PowerShell for running Azure PowerShell module commands and Bash for running Azure CLI commands. Azure Cloud Shell automatically authenticates to your tenant using the current browser credentials, so there is no need to log in using separate commands.

Configuring Azure Cloud Shell

There are two ways to access Cloud Shell:

  • Direct link: Open your browser and navigate to https://shell.azure.com.
  • Azure Portal: Select the Cloud Shell icon when accessing the Azure portal.
Bg1558

Creating the File Share

If this is your first time accessing Cloud Shell, you must create a file share or associate an existing one. In this tutorial, you will create a new file share.

Azure should recognize you do not have any storage mounted and prompt to create a new storage account. From here, you can select the subscription for Azure to automatically create the storage account.

Bg1621

Once Azure creates the file share, the Cloud Shell sessions starts up. In this case, the PowerShell environment opened on first run.

Bg1622

As a bonus step, navigate to the subscription and resource group you selected when configuring the Cloud Shell storage in previous step. Open the storage account and navigate to File shares. Here you should see the new file share that Cloud Shell uses to store files across sessions.

Bg1559

Once you create the file share, Cloud Shell automatically attaches the file share as a folder named clouddrive in your home directory ($HOME). Files and folders saved to the clouddrive are stored in the file share, and Cloud Shell stores any files and folders in the root of $HOME in the container image.

PS /home/bon> ls -l
total 0
lrwxrwxrwx 1 bon bon 22 Aug  7 14:11 clouddrive -> /usr/csuser/clouddrive

Upload your script to the storage account

You can upload your PowerShell scripts to the storage account to run it from anywhere in any browser. In this post, i’ve uploaded a script to create a Windows VM using PowerShell.

Bg1618

Once done, you can see the file in the storage account from cloud shell session.

Bg1619

The script should be exist in the storage account, you can upload script from storage account as well.

Bg1620
ADVERTISEMENT

Switch between Bash and PowerShell

Use the environment selector dropdown menu to switch between the Bash and PowerShell environments. Switching between environments connects to the same running container but with a new shell session. Any running processes will go to the background, and Cloud Shell does not preserve your state when switching.

Bg1560
Bg1561
Bg1562

Restart Cloud Shell Session

Use the restart icon in the toolbar to reset the container machine state. Any files not saved in your Azure file share will be lost.

Bg1563

Manage Text Size and Font

Use the gear icon to select your text size (small, medium, large) and font preferences (Monospace or Courier New). Changes here are persisted across new sessions.

Bg1564

Open a New Session

You can have multiple concurrent sessions across browser tabs. Each session exists as a separate process on the same container machine. Select the new session icon, and the browser opens a new tab with a separate Cloud Shell session.

Bg1565

Edit Files with Cloud Shell Editor

Cloud Shell has an integrated file editor built from the open-source Monaco Editor. The Cloud Shell editor support language highlighting, command palette, and file explorer. You can open the editor using the code editor icon { } from the menu, which opens the editor and defaults to your /home/<user> directory. You can also use the code command to open a directory or a specific file for editing.

Bg1566
ADVERTISEMENT
5/5 - (1 vote)
Previous Post

How to Connect to Microsoft Azure using Windows PowerShell

Next Post

How to Find the VM Image Used to Create an Azure VM using PowerShell

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory