Azure Active Directory \ Connect

Simple snippets to install module and connect to Azure AD.

 

# Run PowerShell ISE as Administrator | Install AAD Module

Install-Module -Name AzureAD

# Connect to Azure Should Be Prompted for Account Info / Login

Connect-AzureAD

# Simple Test to See if Connected

Get-AzureADUser | Where{$_.UserPrincipalName -like "*"} | Select givenname,surname, DisplayName, AccountEnabled

#Disconnect Session

Disconnect-AzureAD

Selectusers2.png