question

RisingFlight-7863 avatar image
0 Votes"
RisingFlight-7863 asked ·

user access to distribution lists and unified group

Hi All
i have 5 users in a csv file and i want to know to which distribution lists and unified groups they have access to. how do i export this information to a csv file. experts guide me on this.

Below is my csv file.

Users
user1@contoso.com
user2@contoso.com

office-sharepoint-onlineoffice-exchange-server-administrationoffice-exchange-online-itprooffice-online-server-generaloffice-online-server-exchange
10 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AshokM-8240 avatar image
1 Vote"
AshokM-8240 answered ·

Hi,

Please refer the scripts available in the below links,

https://social.technet.microsoft.com/Forums/en-US/9a8f028c-db75-4659-8c70-984ab57ad5cc/get-list-of-distribution-groups-that-user-is-a-member-of?forum=winserverpowershell

https://vladtalkstech.com/2018/03/find-all-the-distribution-groups-a-user-is-a-member-of-with-powershell.html

https://vladtalkstech.com/2018/03/find-all-the-office-365-groups-a-user-is-a-member-of-with-powershell.html

Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

Also, suggest to run the powershell commands in a test environment before trying in production.

· 1
10 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Any updates on this? Please let us know if the shared articles were helpful in fetching the required information or needed any further assistance. If the above suggestion helps, click on "Accept Answer" and upvote it.

0 Votes 0 ·
EricYin-MSFT avatar image
0 Votes"
EricYin-MSFT answered ·

For Exchange command Add-MailboxFolderPermission, parameter "-user" should be a user or security group.
So I'm not understanding what do you mean about "which distribution lists and unified groups they have access to", a user mailbox cannot access any distribution group in Exchange aspect.
You might post it on incorrect forum, please confirm the tag you added.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 1
10 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am writing here to confirm with you how the thing going now?
If you need further help, please provide more detailed information, so that we can give more appropriate suggestions.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 Votes 0 ·
RisingFlight-7863 avatar image
0 Votes"
RisingFlight-7863 answered ·

i want to know these users are members of how many distribution lists and unified groups

· 1
10 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


For on-premise Exchange server, this script would list the distribution groups and security groups they are in:

 $names= Import-Csv c:\temp\name.txt
 $Result= @() 
 $groups= Get-DistributionGroup
 foreach ($name in $names) {
 foreach($group in $groups){
 $members= Get-DistributionGroupmember $group
 foreach ($member in $members){
 if ($member.name -eq $name.name){
 $Result1 = New-Object PSObject 
 $Result1 | Add-Member NoteProperty -Name "User" -Value $name.name
 $Result1 | Add-Member NoteProperty -Name "group" -Value $group
 $Result += $Result1
 }}}}
 $Result|Export-csv -Path c:\temp\result.csv -NoTypeInformation


0 Votes 0 ·