13

Get a List of Shared Mailboxes Members and Permissions

 3 years ago
source link: https://microsoftgeek.com/?p=3015
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Get a List of Shared Mailboxes Members and Permissions

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

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}


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK