【问题标题】:Azure cmdlet Remove-AzureDedicatedCircuit errorAzure cmdlet 删除-AzureDedicatedCircuit 错误
【发布时间】:2015-02-17 15:09:23
【问题描述】:

我正在尝试删除已在 Azure 中创建的 ExpressRoute 线路。

电路当前处于“未提供”状态,是使用“New-AzureDedicatedCircuit”cmdlet 创建的,并获得了一个 ServiceKey。

由于带宽选项配置错误,我们想删除电路,我正在尝试使用“Remove-AzureDedicatedCircuit”cmdlet,但它出错了。

语法:

Remove-AzureDedicatedCircuit -ServiceKey "my_service_key_string_here"

收到的错误是:

Remove-AzureDedicatedCircuit : MissingOrIncorrectVersionHeader: Request needs to have a x-ms-version header.
At line:1 char:1
+ Remove-AzureDedicatedCircuit -ServiceKey 6c6af1af-0eb2-4f18-961c-b9ccdf8d50a2 -F ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : CloseError: (:) [Remove-AzureDedicatedCircuit], CloudException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ExpressRoute.RemoveAzureDedicatedCircuitCommand

我尝试使用 -Force 选项运行,但这只会删除确认对话框。 -Debug 选项提供有关 cmdlet 进行的 REST API 调用的更多信息:

DEBUG: 14:20:52 - RemoveAzureDedicatedCircuitCommand begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 14:20:56 - using account id '<redacted_my_azure_ID>'...
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
DELETE

Absolute Uri:
https://management.core.windows.net/<redacted_Azure_subscription_ID>/services/networking/dedicatedcircuits/<redacted_circuit_ServiceKey>?api-version=1.0

Headers:

Body:



DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Date                          : Tue, 17 Feb 2015 14:21:13 GMT
Server                        : Microsoft-HTTPAPI/2.0

Body:
<Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Code>MissingOrIncorrectVersionHeader</Code>
  <Message>Request needs to have a x-ms-version header.</Message>
</Error>

我开始认为存在 cmdlet 错误。

有人有什么想法吗?

【问题讨论】:

  • 所以这是一个已确认的错误,也可以在 set-azurebgppeering cmdlet 中看到。显然,ExpressRoute powershell 模块仍处于正式测试阶段。

标签: powershell azure powershell-cmdlet


【解决方案1】:

尝试安装以前的版本。我使用了 Azure PowerShell v8.14,将其删除并从 https://github.com/Azure/azure-powershell/releases 安装了 8.13。它解决了这个问题。

【讨论】:

  • 找到一位使用早期版本的同事被证明是成功的——我们设法达到了所需的运行 8.12。我和 MS 一起提出的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-05-10
  • 1970-01-01
  • 1970-01-01
  • 2014-03-01
  • 1970-01-01
  • 1970-01-01
  • 2019-01-27
相关资源
最近更新 更多