Powershell error Remove-AzureStorageBlob Method not found: 'Void

為{幸葍}努か 提交于 2020-03-05 05:53:05

问题


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

回答1:


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.

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

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.



来源:https://stackoverflow.com/questions/54615806/powershell-error-remove-azurestorageblob-method-not-found-void

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!