Export Distribution list Members From PowerShell

The attachment is a Export Distribution list Members From PowerShell script to view and export how many groups there are in the Exchange Admin Center and how many users are in each group. It can also be exported if you want to see one group of users.
Run the command given below in the mail then run the script.

Syntax

$Groups = Get-DistributionGroup

$Groups | ForEach-Object {

$group = $_.Name

$members = ”

Download Full Script

Share Script:

Purpose:This script will help the o365 admin export the DL user list (DistributionGroup List).
Modification:DL's name needs to be mentioned in the script
Type:M365 & exchange online
Compatibility:Cloud Only
Tags:
Reference link: