
Step 1: Install required software
These steps are required once on your computer, not every time you connect. However, you’ll likely need to install newer versions of the software periodically.
- Open an elevated Windows PowerShell command prompt (run Windows PowerShell as an administrator).
- In the Administrator: Windows PowerShell command window, run this command:
- Install-Module -Name AzureAD -AllowClobber
Step 2: Connect to your Office 365 subscription
To connect with just an account name and password :
- $UserCredential = Get-Credential
- Connect-AzureAD -Credential $UserCredential
To connect with multi-factor authentication (MFA) :
- Connect-AzureAD
After connecting, you can use the new cmdlets for the
Azure Active Directory V2 PowerShell module.