Forum Discussion
Patrick Rote
Sep 30, 2020Iron Contributor
How to get all users exported from an AD AzureGroup listing their,email addresses?
Hi All, How to get all users exported from an AD AzureGroup listing their,email addresses e.g a group starting with "HRUSERS" Do i need to install a module for powershell? Thanks in advance
- Oct 01, 2020
Use the -Append switch for Export-CSV.
VasilMichev
Sep 30, 2020MVP
PowerShell is the best way to do this, you'll need the AzureAD or the MSOnline module. Here's a sample for the former:
Get-AzureADGroup -SearchString GroupName | Get-AzureADGroupMember | select DisplayName,UserPrincipalName | Export-Csv -nti blabla.csv