Nanda
Nanda

Reputation: 1

How to get users from Distribution list as a non exchange admin or a non tenant admin using PowerShell script?

How to get members or user list from a Email Distribution list using PowerShell command/script.

We are trying to automate Teams App Provisioning for the users in a Email Distribution List using Powershell. As a Non-Exchange Admin or a Non Tenant-Admin i would need to fetch the users from the Distribution list.

Is there any command apart from the below powershell commands can be used to fetch the users from the distribution list ?

Get-AdGroupMember --> AD

Get-DistributionGroupMember --> Exchange

Upvotes: 0

Views: 1081

Answers (2)

Kartheek R
Kartheek R

Reputation: 310

Those are the power shell commands to get the distribution members, we can filter the data if needed Graph API link to get the members from Distribution list

https://learn.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http

Upvotes: 1

Hilton Giesenow
Hilton Giesenow

Reputation: 10804

You could use the Microsoft.Graph PowerShell module for this, I think.

Upvotes: 0

Related Questions