azure powershell login classic

How to Azure PowerShell Login Classic


In this article, we will explore the process of logging into Azure using the classic Azure PowerShell module. Azure PowerShell is a powerful command-line tool that allows users to interact with Azure resources programmatically. By following the steps outlined below, you will be able to log in to Azure using Azure PowerShell Classic and manage your Azure resources effortlessly.


Before we begin, make sure you have the following prerequisites in place:

  1. Azure Account: You must have an active Azure subscription to proceed with the Azure PowerShell login classic process.
  2. Windows PowerShell: Ensure that you have Windows PowerShell installed on your machine, as Azure PowerShell relies on it.
  3. Azure PowerShell Classic: Install the classic Azure PowerShell module on your machine. You can find instructions on how to install it in the official Microsoft documentation.

Once you have the prerequisites ready, let's dive into the step-by-step process of logging into Azure using Azure PowerShell Classic.

Step 1: Launch Azure PowerShell Classic

  1. Open the Windows PowerShell application on your machine. You can find it by searching in the Start Menu or using the Windows Key + R shortcut and typing powershell in the Run dialog box.

  2. Once the PowerShell window opens, type the command Add-AzureAccount and press Enter. This command initiates the Azure login process. You may be prompted to enter your Azure credentials in a separate login window. Provide your username and password associated with your Azure account.

Step 2: Authenticate via Web Browser

  1. After entering your Azure credentials, the command prompt will display a message asking you to sign in. However, since we are using the classic Azure PowerShell module, we need to authenticate ourselves using a web browser.

  2. Copy the URL displayed in the command prompt and open it in your preferred web browser. You will be redirected to a Microsoft Azure sign-in page.

  3. On the sign-in page, enter your Azure account email and click the "Next" button. Then, type your account password and click "Sign in."

  4. Once you have successfully signed in, a page displaying a verification code will appear. Copy the code.

  5. Return to the PowerShell window and paste the verification code in the prompt. Press Enter.

Step 3: Select Azure Subscription

  1. After successfully entering the verification code, Azure PowerShell Classic will retrieve a list of your Azure subscriptions associated with the authenticated account.

  2. If you have multiple subscriptions, use the following command to list them:


This command will output a detailed list of all available subscriptions along with their subscription IDs and other relevant information.

  1. From the list, identify the subscription you want to interact with and make a note of its Subscription ID.

  2. Use the following command to set your chosen subscription as the current subscription:

Select-AzureSubscription -SubscriptionId <Subscription ID>

Replace <Subscription ID> with the Subscription ID you noted earlier. This command ensures that all subsequent Azure PowerShell commands operate within the selected subscription.

Frequently Asked Questions (FAQs)

Q1: Can I use Azure PowerShell Classic on macOS or Linux? A1: No, Azure PowerShell Classic is only available for Windows environments as it depends on Windows PowerShell. For macOS and Linux users, Microsoft offers Azure Command-Line Interface (Azure CLI) as an alternative.

Q2: How can I check if Azure PowerShell Classic is installed on my machine? A2: To check if Azure PowerShell Classic is installed, open your PowerShell window and type the following command: Get-Module -ListAvailable -Name Azure. If you see the Azure module listed, it means you have Azure PowerShell Classic installed.

Q3: Can I use multiple Azure PowerShell Classic sessions concurrently? A3: Yes, you can open multiple PowerShell windows and initiate separate Azure PowerShell Classic sessions. However, ensure you select the proper subscription in each session to avoid unintended actions on different subscriptions simultaneously.


By following the step-by-step process outlined in this article, you should now be able to log in to Azure using Azure PowerShell Classic. Remember to ensure you have the necessary prerequisites, authenticate via the web browser, and select the specific Azure subscription you wish to work with. With Azure PowerShell Classic, you can efficiently manage and automate your Azure resources using the powerful command-line interface. Happy scripting!

Sign in with Azure PowerShell | Microsoft Docs

Azure PowerShell supports several authentication methods. The easiest way to get started is with Azure Cloud Shell which automatically logs you in. With a local install you can sign in interactively through your browser. When writing scripts for automation the recommended approach is to use a service principal with the necessary permissions.

Connect to Azure Classic with PowerShell - Blackforce

Connect to Azure Classic with PowerShell Certain features in Azure can only be managed via PowerShell. Before you can start using the commands you need to install Azure PowerShell.

Getting Started with Azure PowerShell (Classic) - .Net Diaries

Windows install that you can also found at Microsoft Azure Downloads. Configure your Azure Subscription with the Azure PowerShell Cmdlets. The simplest way to access your Azure subscription from PowerShell is to use the Add-AzureAccount cmdlet. Add-AzureAccount After executing the cmdlet a dialog will appear to prompt you to login with your ...

[Powershell] How to access the classic storage account ...

Launch the PowerShell in administrator mode and run the below mentioned commands. #This cmdlet will allow you to login Add-azureaccount #This is will list the Azure Subscription Get-AzureRMSubscription # This cmdlet will provide the complete details of the storage account Get-AzureStorageAccount -StorageAccountName

powershell - How to force Azure Storage Account as classic ...

As far as I can remember the storage account created would be one that the now labeled as "classic" in the UI. However with recent changes the storage account that is now created using the script above is non-classic (V2). This V2 storage account is not recognized by the New-AzureDeployment and it throws this in the Powershell script:

Different ways to login to Azure automation using PowerShell

Any of the three cmdlets can log in to Azure—It looks different but all three commands can be used to authenticate Azure using PowerShell.Connect-AzAccount is the command and Login-AzAccount and Add-AzAccount are the aliases build around the Connect-AzAccount cmdlet PS:\ Get-command AzAccount -Module Az Prepare the Azure Automation script

Install and configure the Azure PowerShell Service ...

Import-Module Azure To use the cmdlets. To start working with the Azure Service Management cmdlets first log on to your Azure account. To log on to your account run the following command: Add-AzureAccount After logging into Azure Azure PowerShell creates a context for the given session.

Get started with Azure PowerShell | Microsoft Docs

In Windows PowerShell 5.1 environments you'll receive a sign-in dialog to provide a username and password for your Azure account. On every other version of PowerShell you'll get a token to use on

Automation: Classic Run As account | Azure updates ...

You can now create a Classic Run As account from the Azure portal. When you create a new Azure Automation account in the Azure portal it automatically creates a Classic Run As account by uploading a certificate. This helps you to quickly start building and deploying runbooks to support your automation needs.

How To Connect To Azure In PowerShell (And Azure AD ...

To connect to Azure PowerShell first we need to install Azure PowerShell on Windows using MSI installer. To work with Azure PowerShell you should have: Windows PowerShell 5.1 ( Update Link )


Leave a comment