Advertisements

Virtualization, Cloud, Infrastructure and all that stuff in-between

My ramblings on the stuff that holds it all together

POSH1Liner Query Azure Active Directory – AAD from PowerShell

You need to install the module (it’s not installed by default) – full cmdlet list is here https://docs.microsoft.com/en-gb/powershell/module/Azuread/?view=azureadps-2.0

this is the new version, seems to use connect-azureAD rather than the connect-MSOLservice you may have used in the past and will work with MFA accounts as it pops a browser window for credentials

Install-Module AzureAD

For example;

Get-AzureADUser

 

will list out all the users synchronised to your AAD, and if you are wondering how to check how many have sync’d from your on-prem AD to AAD you can do

$data = Get-AzureADUser -All $True

Then checking the contents of the $data.count variable will tell you the total number of users in AAD

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: