You can use Windows PowerShell to perform a variety of tasks in Azure, either interactively at a command prompt or automatically through scripts. Azure PowerShell is a module that provides cmdlets to manage Azure through Windows PowerShell.
Prerequisites for using Azure PowerShell
- Azure PowerShell modules require Microsoft .NET Framework 4.5.
How to: Install Azure PowerShell
You can download and install the Azure PowerShell modules by running the Microsoft Web Platform Installer.
How to: Connect to your subscription
Use the Azure AD method
-
Open the Azure PowerShell console, as instructed in How to: Install Azure PowerShell.
-
Type the following command:
1Add-AzureAccount -
In the window, type the email address and password associated with your account.
-
Azure authenticates and saves the credential information, and then closes the window.
Getting Help
These resources provide help for specific cmdlets:
-
From within the console, you can use the built-in Help system. The Get-Help cmdlet provides access to this system. The following table provides some examples of commands you can use to get Help. You can get more information from within the console by typing help.
-
Reference information about the cmdlets in the Azure PowerShell modules is also available in the Azure library. For information, see Azure Cmdlet Reference.
Command Result Get-Help Describes how to use the Help system. Note: The description includes some information about Help files that does not apply to the Azure module. Specifically, Help files are installed when the module is installed. They are not available for download separately.
Get-Help Azure Gets all cmdlets in the Azure module. Get-Help <language>-dev Gets cmdlets for developing and managing applications in a specific language. For example, help node-dev, help php-dev, or help python-dev. Get-Help <cmdlet> Gets help about a Windows PowerShell cmdlet. Replace with the cmdlet name. Get-Help <cmdlet> -Parameter * Gets descriptions of the cmdlet parameters. The asterisk (*) means “all”. Get-Help <cmdlet> -Examples Gets the syntax and examples of using the cmdlet. Get-Help <cmdlet> -Full Gets all help for a cmdlet, including technical details.
This way you can easily manage azure through command.