Azure cmdlet Remove-AzureDedicatedCircuit 错误
Azure cmdlet Remove-AzureDedicatedCircuit error
我正在尝试删除在 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 错误。
大家有什么想法吗?
尝试安装以前的版本。我使用了 Azure PowerShell v8.14,将其删除并从 https://github.com/Azure/azure-powershell/releases 安装了 8.13。它解决了问题。
我正在尝试删除在 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 错误。
大家有什么想法吗?
尝试安装以前的版本。我使用了 Azure PowerShell v8.14,将其删除并从 https://github.com/Azure/azure-powershell/releases 安装了 8.13。它解决了问题。