Hi @Андрей Михалевский
Are you using Exchange on-premises or Exchange Online?
If Exchange on-premises you can run scripts like below in Exchange Management Shell to export the results to a csv file:
$Result = Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited |
foreach{
$FullAccess = Get-MailboxPermission $_.Name | where-object {($_.User -notlike "NT AUTHORITY\SELF") -and ($_.IsInherited -eq $false)}
$SendAs = Get-Mailbox -Identity $_.Name | Get-ADPermission | where-object {($_.User -notlike "NT AUTHORITY\SELF") -and $_.ExtendedRights -like "*send*"}
New-Object psobject -Property $([ordered]@{
Shared_Mailbox = $fullaccess.identity
FullAccess_Users = $fullaccess.user
SendAs_Users = $SendAs.user
})
}
$Result | Export-Csv C:\temp\Shared_Mailbox_Delegates.csv
I also need to get unique users that do not overlap in groups.
Would you clarify more on the requirement?
Do you mean getting users that only belong to a single distribution list? (To me which may be another question not related to the original question about getting shared mailbox permissions)
If yes, kindly note that Microsoft Q&A forum recommends only asking one question per thread unless the questions are related.
Please consider creating another thread for this question.
It would also make it easier for community members to search questions and find answers.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.