Showing posts with label member. Show all posts
Showing posts with label member. Show all posts

14 May 2022

How to get a list of the members of an email distribution list, and a list of the members of an office 365 team?


(1) Email distribution list

Go to office.com > 9 dots > admin > show all > exchange > dashboard_recipients_groups.

Click to select a group, e.g. cics.staff. Click 'Edit' > membership. Ctrl-a Ctrl-c

Ctrl-v in a text editor.

(2) Team

Go to the team, e.g. team_staff. Wait for quite a while, and need repeat scrolling up and down, until all the members are displayed, before mouse-dragging all the members, and Ctrl-c

Ctrl-v in a text editor.

13 May 2022

How to export a list of members of an email group from Office 365?

https://answers.microsoft.com/en-us/msoffice/forum/all/how-do-i-really-export-distribution-list-members/efe355ff-cc64-4235-8615-364bbff75382

Based on my tests and researches, it is not feasible to export distribution list members using UI interface. We can only export the members via Windows PowerShell. To do that, the steps are as follows:

1. Open Windows PowerShell and connect to Exchange Online PowerShell. Here are the commands:

Install-Module ExchangeOnlineManagement (Enter Y to install the module)

Connect-ExchangeOnline (Sign in using admin account and password)

2. Then run the following script to get a csv file about Distribution list.

$Groups = Get-DistributionGroup

$Groups | ForEach-Object {

$group = $_.Name

$members = ''

Get-DistributionGroupMember $group | ForEach-Object {

$members=$_.Name

New-Object -TypeName PSObject -Property @{

GroupName = $group

Members = $members

EmailAddress = $_.PrimarySMTPAddress

}}

} | Export-CSV "C:\DistributionGroupMember.csv" -NoTypeInformation -Encoding UTF8

Here is a screenshot about the result I got:

Image