How To Install Azure AD And Microsoft Online PowerShell Module

Introduction

This article is about how to set up Azure AD & Microsoft Online PowerShell Module.

Prerequisites

PowerShell 5.0 or the latest

Step 1

Open PowerShell and run as Admin

Step 2

Run the following cmdlet. Once run cmdlet it will ask you to enter Yes to install

Install-Module azuread

How to Install Azure AD and Microsoft Online PowerShell Module

Note: If you get any error message while scripting. Please run the following cmdlet. Otherwise, ignore it. 

Install-PackageProvider -Name NuGet -Force
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Step 3

Run the following cmdlet

Install-Module msonline

How to Install Azure AD and Microsoft Online PowerShell Module

Connect to a Microsoft service portal

Step 4

Run the following cmdlet

Connect-MsolService
Connect-AzureAD

How to Install Azure AD and Microsoft Online PowerShell Module

Conclusion 

This article taught us how to install Azure AD and Microsoft Online module PowerShell. If you have any questions, please contact me.

Thanks.