问题描述
调用 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模块,然后即可正常使用: https://docs.microsoft.com/zh-cn/powershell/azure/azurerm/install-azurerm-ps?view=azurermps -6.13.0
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/和 https://docs.microsoft.com/zh-CN/powershell/azure/new-azureps-module-az?view = azps-1.2.0 .
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方法未找到:'无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!