Search: Advanced search
Browse by category:
Connect Powershell to your Windows Azure subscription
In order to do anything advanced in Windows Azure you will need to use Microsoft’s Powershell.
This includes things such as managing multiple access keys for virtual networks or simply assigning a static IP address to a VM.
You will need to download and install “Microsoft Azure PowerShell” CMDLETS. Although once you have installed the CMDLETS you can access the commands from any powershell console, we recommend launching the dedicated Azure Powershell console this will limit the commands to azure specific commands.
The CMDLETS and console can be downloaded and installed via the Web Platform Installer
Solution 1 (The AD Method)
In this solution you simply authenticate to Azure using PowerShell via a single PowerShell command.
Once you have logged in you have successfully connected PowerShell to Azure.
Solution 2 (Certificate Method)
This method requires you create a “publishSettingFile” from the Azure management portal (using PowerShell) then import that file into PowerShell.
Confirm account and subscriptions available to PowerShell
Command to list all accounts and subscriptions available.
Set Default Azure subscription
Use the following command to set a default Azure subscription
Select-AzureSubscription -default [subscriptionName]
Substitute [subscriptionName] for the name of a subscription you wish to make default. you can get the “subscriptionName” value by using the command:
Set the current working subscription
If you have multiple subscriptions you can switch between them using the following command:
Select-AzureSubscription -current [subscriptionName]
Substitute [subscriptionName] for the name of a subscription you wish to set as current. You can get the “subscriptionName” value by using the command: