Reputation: 1920
From powershell, I am trying to add certificate to a service that was already created and I am running into the following error
Add-AzureCertificate : HTTP Status Code: NotFound - HTTP Error Message: https://management.core.windows.net/97d3cd24-78a1-44ba-aea4-0dd7c733cb56/services/hostedservices/XXXX /certificates does not exist.
Operation ID: dc1eabcef0c74861853fe53ed047f674 At + Add-AzureCertificate <<<< -ServiceName $servicename -CertToDeploy $CertificatePath -Password $Password + CategoryInfo : CloseError: (:) [Add-AzureCertificate], CommunicationException + FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.Certificates.AddAzureCertificate
This works fine on one subscription (say subscription A) but fails on each service in the subscription (say subscription B)
Wondering what this error actually means? I do see a folder by the name 'Certificates' under the service to which I am trying to add the certificate
I have also imported the appropriate publish settings of subscription A & B and I don't do anything different on subscription A to make it work!
Could you please help me on it?
Upvotes: 1
Views: 984
Reputation: 132
If I understand it correct, It might be due subscription context. to In case of multiple Subscription, its necessary to change default context of Subscription in your power-shell for which you are trying to perform operation .
-----------------This Might help to change the context ------------
Select-AzureSubscription
PS C:\> Select-AzureSubscription -SubscriptionName SubscriptionA
PS C:\>
Set-AzureSubscription
PS C:\> Set-AzureSubscription -SubscriptionName SubscriptionA -CurrentStorageAccount <YourStorageaccountName>
PS C:\>
Remove-AzureSubscription
PS C:\> Remove-AzureSubscription -SubscriptionName SubscriptionA -Force
WARNING: The default subscription is being removed. Use Select-Subscription <subscriptionName> to select a new default subscription.
WARNING: The current subscription is being removed. Use Select-Subscription <subscriptionName> to select a new current subscription.
Upvotes: 1