1
votes

When trying to create Azure Cloud Shell storage, it seems to fail, and I cannot upload any files to the shell. Here is the output from the Cloud Shell window:

Requesting a Cloud Shell.Succeeded.
Connecting terminal...

Import-Module: /opt/microsoft/powershell/7/profile.ps1:13
Line |
  13 |  Microsoft.PowerShell.Core\Import-Module -Name PSCloudShellUtility
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Could not get access to the shared lock file.

Az.Accounts\Enable-AzureRmAlias: /opt/microsoft/powershell/7/profile.ps1:26
Line |
  26 |  Az.Accounts\Enable-AzureRmAlias
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The term 'Az.Accounts\Enable-AzureRmAlias' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
     | correct and try again.

InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:293
Line |
 293 |  & ($script:PSCloudShellUtilityModuleInfo){Get-CloudShellTip -ErrorAct …
     |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.

VERBOSE: Authenticating to Azure ...
InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:60
Line |
  60 |      & ($script:PSCloudShellUtilityModuleInfo){param([string]$Label, [ …
     |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.

Invoke-CloudShellTelemetry: /opt/microsoft/powershell/7/profile.ps1:91
Line |
  91 |          Invoke-CloudShellTelemetry -LogLabel "GETSUBSCRIPTIONID" -Sta …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.

InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:60
Line |
  60 |      & ($script:PSCloudShellUtilityModuleInfo){param([string]$Label, [ …
     |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.

InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:60
Line |
  60 |      & ($script:PSCloudShellUtilityModuleInfo){param([string]$Label, [ …
     |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.

InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:60
Line |
  60 |      & ($script:PSCloudShellUtilityModuleInfo){param([string]$Label, [ …
     |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.

VERBOSE: Building your Azure drive ...
InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:60
Line |
  60 |      & ($script:PSCloudShellUtilityModuleInfo){param([string]$Label, [ …
     |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.

New-PSDrive: /opt/microsoft/powershell/7/profile.ps1:391
Line |
 391 |      $null = Microsoft.PowerShell.Management\New-PSDrive -Name Azure - …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Could not get access to the shared lock file.

WARNING: Something went wrong while creating Azure drive. You can still use this shell to run Azure PowerShell commands.
InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:60
Line |
  60 |      & ($script:PSCloudShellUtilityModuleInfo){param([string]$Label, [ …
     |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.

InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:404
Line |
 404 |  & ($script:PSCloudShellUtilityModuleInfo){Set-CloudShellPSReadLineKey …
     |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.

InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:60
Line |
  60 |      & ($script:PSCloudShellUtilityModuleInfo){param([string]$Label, [ …
     |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.

PS /home/james>

I am posting this question as requested by Azure Support on Twitter at: https://twitter.com/AzureSupport/status/1326180959843127298?s=20

1
Are you using cloud shell in Azure portal or in your local machine?krishg
Cloud Shell in the Azure Portal. I also tried shell.azure.comBigDevJames
And you are sure that cloud shell is not disabled in your environment? docs.microsoft.com/en-us/azure/cloud-shell/…krishg
Since it is my personal Azure Subscription and Tenant, I highly doubt it.BigDevJames

1 Answers

0
votes

It seems like it might have been a time-related issue. I ended up deleting all of the cloud shell resources and waiting. It took a couple of hours and then I tried again and it worked. I wish there was a way to monitor the deleting of resources that would effectively show if this would be an issue.