gpt4 book ai didi

azure - Powershell 错误Remove-AzureStorageBlob 未找到方法 : 'Void

转载 作者:行者123 更新时间:2023-12-03 04:46:19 25 4
gpt4 key购买 nike

enter image description here enter image description here

调用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 模块。根据错误信息,您可能没有安装它,我可以在我这边重现您的问题。

enter image description here

要解决此问题,请按照此文档安装 AzureRM powershell 模块,然后它将正常工作:https://learn.microsoft.com/en-us/powershell/azure/azurerm/install-azurerm-ps?view=azurermps-6.13.0

此外AzureRM模块已基本弃用,我建议您使用新的Az模块。欲了解更多详情,请参阅:https://azure.microsoft.com/en-us/blog/azure-powershell-cross-platform-az-module-replacing-azurerm/https://learn.microsoft.com/en-us/powershell/azure/new-azureps-module-az?view=azps-1.2.0 .

关于azure - Powershell 错误Remove-AzureStorageBlob 未找到方法 : 'Void,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54615806/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com