微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

创建Azure Cloud Shell存储时遇到问题

如何解决创建Azure Cloud Shell存储时遇到问题

尝试创建Azure Cloud Shell存储时,它似乎失败,并且我无法将任何文件上传到Shell。 这是Cloud Shell窗口的输出

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,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,or a CommandInfo object.

InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:60
Line |
  60 |      & ($script:PSCloudShellUtilityModuleInfo){param([string]$Label,or a CommandInfo object.

VERBOSE: Building your Azure drive ...
InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:60
Line |
  60 |      & ($script:PSCloudShellUtilityModuleInfo){param([string]$Label,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,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,or a CommandInfo object.

PS /home/james>

我应Azure支持在Twitter上发布此问题: https://twitter.com/AzureSupport/status/1326180959843127298?s=20

解决方法

似乎这可能是一个与时间有关的问题。我最终删除了所有云外壳资源并等待。花了几个小时,然后我再次尝试并成功了。我希望有一种方法可以监视资源的删除,从而有效地显示这是否是一个问题。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。