3

I never used Azure PowerShell before, but now I'm running a command to have Azure reserve a static IP address:

New-AzureReservedIP –ReservedIPName "137.117.11.18" –Label "people-dns-ip" –Location "US West"

And then I'm getting this error: New-AzureReservedIP : No default subscription has been designated.

So, I was trying to figure out what is the or just set to default... using the command Select-AzureSubscription I can see that The subscription name BizSpark doesn't exist.

Not sure how to print the value of Get-AzureSubscription on the screen, but in my Azure portal is says: SUBSCRIPTION NAME BizSpark

Any idea how to resolve this? or maybe this option is limited for BizSpark users??

2 Answers 2

9

To use Azure Powershell at very first you should use

Add-AzureAccount

it will give you a popup where you can login with you azure credentials. this way you will connect to your Azure subscription in Azure Powershell

1
  • While running Add-AzureAccount against a ARM subscription, you may get an error "No subscriptions are associated with the logged in account in Azure Service Management (RDFE)". To get around this, please add yourself as an admin/co-admin. Aug 14, 2018 at 23:15
3

Need to add your azure account to be able to manage assets:

If for some reason method 1 doesn't work, try method 2.

Method 1:

At powershell, run:

Add-AzureAccount

Method 2:

At powershell, run:

Get-AzurePublishSettingsFile

Sign in to the Windows Azure Management Portal, and then follow the instructions to download your Windows Azure publishing settings.

Again at powershell, run:

Import-AzurePublishSettingsFile <mysettings>.publishsettings

Replace with the file name of the publishsettings file that you downloaded in the previous step and correct the path if necessary.

4
  • Add-AzureAccount before Select-AzureSubscription will suffice. Subscription certificates are no longer required for Powershell. In fact, they are deprecated in ARM-mode.
    – MrBink
    Aug 1, 2015 at 13:02
  • i could never make it work just with add-azureaccount maybe that's because i have multiple subscriptions or maybe i'm not using corporate account, but without downloading the certificates it doesn't work for me. Aug 1, 2015 at 13:05
  • That's strange. I haven't run into any issues with Add-AzureAccount for my Microsoft account that's associated with multiple subscriptions. Perhaps you should submit an issue at github.com/Azure/azure-powershell?
    – MrBink
    Aug 1, 2015 at 13:09
  • maybe it was the powershell version i was using at work. Tried at my home computer now. Seems to be working just with add-azureaccount but i had this problem several times before and every time i had to download the certificate. Never bothered to troubleshoot tho. thanks. I've updated the answer. Aug 1, 2015 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.