I am trying to drop an ExpressRoute circuit which has been created in Azure.
The circuit is currently in status "NotProvisioned", and was created using the 'New-AzureDedicatedCircuit' cmdlet, and a ServiceKey obtained.
Due to a misconfiguration of the bandwidth option, we want to delete the circuit, and I am attempting to use the 'Remove-AzureDedicatedCircuit' cmdlet, however it is erroring out.
Syntax:
Remove-AzureDedicatedCircuit -ServiceKey "my_service_key_string_here"
The received error is:
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
I have tried running with the -Force option, but this merely removes the confirmation dialogue. The -Debug option provides more information around the REST API calls made by the cmdlet:
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>
I'm starting to think there's a cmdlet bug.
Anyone have any thoughts?
Try to install previous version. I used Azure PowerShell v8.14, removed it and installed 8.13 from https://github.com/Azure/azure-powershell/releases. It solved the problem.