Questions tagged [azure-cloud-shell]

Azure Cloud Shell is a browser-based shell experience running in the cloud to help manage your Azure resources, which is available in the Azure portal, the Azure mobile app, and in some Azure documentation topics. Use this tag when your question is specific to Cloud Shell use.

Azure Cloud Shell is a browser-based shell experience running in the cloud to help manage your Azure resources. Cloud Shell includes support for popular command-line tools and programming languages in a shell that Microsoft maintains and updates, and you can persist files with attached Azure File storage. Cloud Shell saves you the trouble of configuring and maintaining an admin machine of your own by providing a clean, ready-to-use shell experience every time from virtually anywhere. Cloud Shell is accessible from a variety of locations, including shell.azure.com.

For more information, see Azure Cloud Shell documentation.

Persisted Storage (clouddrive)

On the first launch, Cloud Shell prompts to create a clouddrive to persist files on your behalf. This is a one-time step and will be automatically attached for all sessions.

Cloud Shell creates three resources on your behalf for the clouddrive:

  • Resource Group named: cloud-shell-storage-<region>
  • Storage Account named: cs-uniqueGuid
  • File Share named: cs-<user>-<domain>-com-uniqueGuid

You can also attach your own file share as a clouddrive' using themountcommand. Use theunmount` command to detach a file share.

Mount:

clouddrive mount -s mySubscription -g myResourceGroup -n storageAccountName -f fileShareName [--disk-size n]

Disk size (optional) is in GB (default is 5).

Unmount:

clouddrive unmount

The file share for your unmounted clouddrive will continue to exist unless manually deleted. Cloud Shell will no longer search for this file share on subsequent sessions.

Discover File Share

The df command will list the file share used for your current clouddrive.

Status

Bash in Cloud Shell generally available as of 20.11.2017. PowerShell in Cloud Shell in public preview.

167 questions
2
votes
2 answers

Azure cloud shell always shows "command not found"

Azure cloud shell shows "command not found" no matter what command I enter - sudo, bash, az, apt-get etc. I suppose this is due to the fact I have run these commands: sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock sudo rm…
2
votes
0 answers

Azure Portal - Browser based Command line interface hang

I am using browser-based Azure CLI for creating managed app definition for my azure managed application. Previously I was using a storage account for the CLI which I just deleted because I realized that it has no use other than azure CLI and I…
1
vote
1 answer

How to Run PowerBI REST API in Azure Cloud shell

I'm trying to get the powerbi apps details using the Azure Cloudshell, Here is the Powershell script i'm using, $secret="********" $tenantId="********" $appId="********" $password= ConvertTo-SecureString $secret -AsPlainText -Force $credential=…
1
vote
1 answer

Get groups user is memberof azure cli

To know whether the user is a part of any Azure ad group or not I used below Azure cli command az ad group member check --group groupname --member-id ****** This gave me output with warning like below: az : WARNING: The underlying Active Directory…
1
vote
1 answer

How to get New-AzureADPolicy to work in azure cloud shell

I was able to run Install-Module -Name AzureADPreview But when I run $policy = New-AzureADPolicy -Definition @('{"TokenLifetimePolicy" {"Version":1,"AccessTokenLifetime":"02:00:00"}}') It run into this error New-AzureADPolicy: The term…
1
vote
1 answer

Securing storage account with remote tfstate

How to disable public access to Azure storage account but still accessible from cloudshell. What I have and works: Az-storage account that contains "terraform.tfstate" with public access main.tf file in my "Azure Cloudshell" with "backend" config…
1
vote
1 answer

Get only Enterprise application via Azure powershell

I know I can run Get-AzureADServicePrincipal -all $true to get a list of applications but it will return all application type including Microsoft apps and managed identities. I only want a list of Enterprise Applications only. What command I can…
Steve
  • 175
  • 1
  • 3
  • 14
1
vote
2 answers

Gathering a list of both Standard Attr. and Extended attr. for Azure

I am new to PowerShell and am looking to do something and am not able to figure it out, so naturally I turn to the experts over here. I don't know if it makes a difference, but I will be using Cloud Shell to run this operation. I am needing to…
1
vote
2 answers

Find out the resource group of the storage account of cloud shell

So I know that there is a storage account behind Azure Cloud Shell. How can I find out which storage account it is and most important which resource group is my Cloud Shell storage account belongs to?
Steve
  • 175
  • 1
  • 3
  • 14
1
vote
0 answers

Azure Cloud Shell editor is not opening

Trying to create and edit .yaml file in Azure Cloud Shell (Kubernetes manifest file for testing ingress in AKS). But neither code demo.yaml (or code .), nor clicking on { } is opening editor. I tried: Unmounting fileshare (clouddrive unmount) and…
MD TAREQ HASSAN
  • 1,188
  • 20
  • 46
1
vote
1 answer

Request Disallowed By Policy

I am following the steps mentioned in this exercise on Microsoft Azure, given the exercise link below: Azure Developer League: Secure Azure Kubernetes Cluster I am stuck at the below code. When I run this code in the azure cloud shell(sandbox), as…
1
vote
1 answer

How to hide sensitve values in error messages in Azure PowerShell?

In azure Powershell I use the command "az vm run-command invoke" to execute scripts to virtual machines, the problem is when for some reason it doesn't work, it prints in the error message all the parameters'value in clear, and these parameters are…
1
vote
1 answer

az keyvault does not list secret

I'm using azure cli from the windows terminal azure cloud shell. I expect az keyvault secret list --vault-name myKeyVaultName to list all the secrets in my vault but it only shows me a black screen. What am I doing wrong? Any Suggestions?
hannes neukermans
  • 12,017
  • 7
  • 37
  • 56
1
vote
1 answer

JMESPath query on combining search with ? and contains keyword in azure cloudshell bash cli

I am trying to write an azure cli JMESPath query to output all names which contain the word db and is of osType windows. For this I have written the following query which works by calling the external bash utility called grep. But I am unable to get…
bagavadhar
  • 129
  • 8
1
vote
1 answer

Automating Azure Cloud Shell provision deprovision storage account

Need to Manage Azure Cloud Shell(ACS) storage account. As we have a huge audience who uses ACS it is difficult for us to manage individual storage. Sometimes we run short of the Storage account quota. Is there a way to manage ACS storage via…
Madhur Asati
  • 185
  • 3
  • 13
1 2
3
11 12