Case Status
Log In


Exporting users from Azure AD …
  • RSS Feed

Last modified on 6/5/2020 10:27 AM by User.


Exporting users from Azure AD using Powershell

Open Powershell as administrator

You will see the prompt - C:\WINDOWS\system32

Type CD C:\

You should see C:\

Type Install-module azuread

The system will install the necessary modules, agree to the prompts as below

Copy the script into the root of your C:\ drive.

This script Export365Members.ps1 selects users from the 'Signature Users' group and exports the information as per this example users_file.csv

Potential issues:

WARNING: Unable to download from URI '' to ''.

Solution: Set Powershell to TLS 1.2 by running the commend below:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Unable to execute unsigned script

Solution: Remove the execution policy for all the users of the local computer by running the command below:

Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope LocalMachine