You can manage your Azure account using the Azure Web Portal or via Azure Cloud Shell. Azure Cloud Shell provided an authenticated, interactive and browser-based shell for managing Azure resources. It also provided choosing the shell experience for both PowerShell or Bash command. Azure Cloud Shell requires an Azure Files Storage, a cloud drive to be mounted as to persist files.
When you instantiate the Azure Cloud Shell for the very first time it creates all the required Azure resources and mounts them accordingly.
Quick Overview of Azure Cloud Shell:
Click the Cloud Shell button on the menu in the upper right of the Azure portal.
Shell will have both options for Bash and Powershell. Select the PowerShell environment from the drop-down and you will be on your cloud drive. In case you are launching it for the first time, you need to first create a storage and then mount the drive, however, this is just matter of a single click.
Related Tip: Setting up Continuous Delivery for Azure App Services from Azure Portal
Let’s check how it works. If you are familiar with PowerShell, now you can leverage your PowerShell skills to play around with all azure resources. For an instance, type following command to change Shell directory from root to a specific subscription.
PS Azure:\> cd "Visual Studio Ultimate with MSDN"
You will have output as below
Azure:\Visual Studio Ultimate with MSDN PS Azure:\>
Now again execute the following command
Azure:\Visual Studio Ultimate with MSDN PS Azure:\> cd AllResources
and then
PS Azure:\> dir
The Azure Cloud Shell will list out all the Azure resources as shown in below image.
This was just an example of how the cloud shell works. Now you can start exploring it with all the PowerShell commands or scripts.
Uploading Files using Azure Cloud Shell:
Coming back to the context of this post, if you want to upload any files to the mounted storage of the cloud shell, you can do it using PowerShell scripts. However, you can easily do it without using the script. Just select the upload button in the Toolbar of the cloud shell. That’s it.
Once the upload is successful, you will get a notification as shown below.
Once the upload is successful, You can navigate to the cloud drive resources and check out for the all the files that were uploaded.
Azure Cloud Shell is very powerful and if you have good command over PowerShell of bash scripting you can do things much faster.
Hope this helps.
Pingback: How to enable Azure cloud backup for Azure file shares? - Daily .NET Tips