Posts Tagged ‘designated’
Azure Powershell Error No current subscription has been designated. Use Select-AzureSubscription – Current to set the current subscription
Hello Everyone, Today i was doing some testing and configuration on my Windows Azure server and got a weird error message as shown below:
Test-AzureStaticVNetIP : No current subscription has been designated. Use Select-AzureSubscription –
Current <subscriptionName> to set the current subscription.
At line:1 char:1
+ Test-AzureStaticVNetIP –VNetName test –IPAddress 11.0.0.1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Test-AzureStaticVNetIP], ApplicationException
+ FullyQualifiedErrorId :
System.ApplicationException,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.TestA
zureStaticVNetIPCommand
Did some research and found that we need to connect to Azure subscription and then run these command. To do so we need to download and install Azure Powershell. Copy paste below url on your browser and install the Web Platform Installer. This will give you option to download Azure Powershell.
http://go.microsoft.com/fwlink/p/?linkid=320376&clcid=0x409
Once the Powershell is downloaded and installed, we will
Now we will download the Azure Setting file to connect to the azure server. In the Azure Powershell, type below command.
Get-AzurePublishSettingsFile
Once you login to your Azure website, you will get a file named “Visual Studio Premium with MSDN-date-credentials.publishsettings”. Save it to a secure location. This file contains secure credentials and additional information about subscriptions that you can use in your development environment.
Now Import the Azure Settings file to Powershell. Run “Import-AzurePublisingSettingsFile” and then type path of the file we just downloaded as shown in below image
To check Subscription details run below command
Get-AzureSubscription
Now the command completed successfully.