Azure cmdlet Remove-AzureDedicatedCircuit错误

时间:2015-02-17 15:09:24

标签: powershell azure cmdlet

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

该电路目前处于状态" NotProvisioned",并且是使用' 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错误。

有人有任何想法吗?

1 个答案:

答案 0 :(得分:0)

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