Powershell错误Remove-AzureStorageBlob方法未找到:'无效 [英] Powershell error Remove-AzureStorageBlob Method not found: 'Void

查看:204
本文介绍了Powershell错误Remove-AzureStorageBlob方法未找到:'无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

调用 Remove-AzureStorageBlob Powershell

Getting Error while calling Remove-AzureStorageBlob Powershell

Remove-AzureStorageBlob -Container $ConName -Blob $BlobName -Context $Ctx
Remove-AzureStorageBlob : Method not found: 'Void
Microsoft.WindowsAzure.Storage.OperationContext.set_StartTime(System.DateTime)'.
At line:1 char:1
+ Remove-AzureStorageBlob -Container $ConName -Blob $BlobName -Context  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Remove-AzureStorageBlob], StorageException
    + FullyQualifiedErrorId : StorageException,Microsoft.WindowsAzure.Commands.Storage.Blob.RemoveStorageAzureBlobComm
   and

推荐答案

您的命令属于AzureRM powershell模块.根据错误消息,您可能没有安装它,我可以在您这一边重现您的问题.

Your commands belong to the AzureRM powershell module. According to the error message, you may not install it, I can reproduce your issue on my side.

要解决此问题,请按照以下文档安装AzureRM powershell模块,然后即可正常使用:

To fix the issue, follow this doc to install AzureRM powershell module, then it will work fine : https://docs.microsoft.com/en-us/powershell/azure/azurerm/install-azurerm-ps?view=azurermps-6.13.0

此外,基本上已经弃用了AzureRM模块,我建议您使用新的Az模块.有关更多详细信息,请参见: https://azure.microsoft.com/zh-CN/blog/azure-powershell-cross-platform-az-module-replacing-azurerm/

Besides, the AzureRM module has been deprecated basically, I recommand you to use the new Az module. For more details, see : https://azure.microsoft.com/en-us/blog/azure-powershell-cross-platform-az-module-replacing-azurerm/ and https://docs.microsoft.com/en-us/powershell/azure/new-azureps-module-az?view=azps-1.2.0.

这篇关于Powershell错误Remove-AzureStorageBlob方法未找到:'无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆