If you want to get a list of members from an O365 shared mailbox using powershell, you can run either command to do so:
Get-Mailbox “Shared Mailbox Name” | Get-MailboxPermission | where {$_.user.tostring() -ne “NT AUTHORITY\SELF” -and $_.IsInherited -eq $false} | Format-Table Identity, User, AccessRights –AutoSize
OR
Get-Mailbox “Shared Mailbox name” -ResultSize:Unlimited | Get-MailboxPermission |Select-Object Identity,User,AccessRights | Where-Object {($_.user -like ‘*@*’)}|Export-Csv C:\Temp\sharedfolders.csv -NoTypeInformation
Output example:
Get-Mailbox “Shared Mailbox Name” | Get-MailboxPermission | where {$_.user.tostring() -ne “NT AUTHORITY\SELF” -and $_.IsInherited -eq $false} | Format-Table Identity, User, AccessRights –AutoSize
Identity User AccessRights
——– —- ————
contoso.com/Exchange users/EMEA Help Desk (IT) CONTOSO\TRedmond {FullAccess}
contoso.com/Exchange users/EMEA Help Desk (IT) CONTOSO\Ito {FullAccess}
contoso.com/Exchange users/APJ Help Desk CONTOSO\TRedmond {FullAccess}
contoso.com/Exchange users/APJ Help Desk CONTOSO\Ako {FullAccess}
contoso.com/Exchange users/APJ Help Desk CONTOSO\JChen {FullAccess}
contoso.com/Exchange users/Contoso PR queries CONTOSO\TRedmond {FullAccess}
contoso.com/marketing/Marketing Queries CONTOSO\TRedmond {FullAccess}
contoso.com/marketing/Marketing Queries CONTOSO\Akers {FullAccess}
Got a project that needs expert IT support?
From Linux and Microsoft Server to VMware, networking, and more, our team at CR Tech is here to help.
Get personalized support today and ensure your systems are running at peak performance or make sure that your project turns out to be a successful one!
CONTACT US NOW