How to deploy to Azure with powershell?

Question:

I want to deploy my application to azure with powershell. So far I have created a certificate in the localmachine store, I’m not going to run the deploy script as me, uploaded the script to azure. The next step is to get access to the service on azure in powershell but there it fails. The script I have so far is:

It fails on the last row with the following message:

I really don’t know what the problem is, the certificate I’m trying to use is uploaded so it feels like there is something fundamental I’ve missed.

Update: I did get it to work after downloading the .publishsettings-file and importing that instead of trying to use Set-AzureSubscription. I’m still a little bit confused though, shouldn’t it be possible to use the method I tried above?

Answer:

I finally found the problem, and of course it was a user problem. First when I was in the azure portal I didn’t find where to upload the certificate, so I uploaded it to first place I found mentioning certificates. What I did found out was that this area was the wrong one, I uploaded the certificate to the certificate area under the cloud service I wanted to administrate, which is the wrong place.

The correct place to upload the certificate to is under settings in the admin portal of azure. So the code above works if the certificate is uploaded to the correct location.

Source:

How to deploy to Azure with powershell? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply