How to connect to azure active directory powershell

ConnectAzureActiveDirectoryPowerShell

Azure active directory can be accessed either by using the azure portal or you can connect to azure active directory using powershell. Azure active directory is used for centrally managed identity and access control management. Azure ad tenant represents organization which have users and groups . You can give various apps and data access to users and groups based on your business needs.

Prerequisite :
  • Valid access role to connect to azure active directory
  • Azure powershell module (if not please follow the setps mentioned below)

How to add Azure AD Guest User

Learn Azure Active Directory Tenant in 3 Minutes

Steps to connect to azure active directory powershell

  1. Steps install Azure powershell module (if you already have you can skip to step 2 directly)

Azure powershell module needed Windows powershell 5.1 (By default available with Windows 10)

If you want to check the version of your powershell, you can use followng command :

$PSVersionTable.PSVersion

Open the powershell in the administrator mode :

Run the following command :

Install-Module -Name Az -Repository PSGallery -Force
install-azure-module-powershell

Press ‘Y’ to continue and it will install the az module.

You can check the module installed using the following command :

Get-InstalledModule
get-all-installed-module-powershell

2. Open the powershell in the admin mode and install azure ad module using the following command :

Install-Module AzureAD
connect-to-azure-active-directory-powershell

Run the below command to see list of the module installed. Just check whether the AzureAD module installed or not :

Get-InstalledModule

You will see the intsalled AzureAD module like this :

3. Now its time to connect to azure active directory. Use the following command to connect :

Connect-AzureAD

When you run this command it will open up the login window and ask you to provide the credentials to connect to azure ad account :

connect to azure active directory powershell

Once you logged in successfully, it will look like this :

connect-to-azure-active-directory-powershell

Conclusion

In this article we have seen the step by step guide to connect to azure active directory powershell. PoweShell is always one of the preferred choice by all the network admin instead of using the azure portal.

Deepak Goyal

<b>Deepak Goyal is certified Azure Cloud Solution Architect. </b>He is having around decade and half experience in designing, developing and managing enterprise cloud solutions. He is also Big data certified professional and passionate cloud advocate.

Leave a Reply

Your email address will not be published. Required fields are marked *