Forum Discussion
Listing shared mailboxes and members - Powershell
Hi,
Does anyone knows how to get a list of shared mailboxes and members with powershell?
Thanks in advance,
Regards
23 Replies
- NawazKhanCopper Contributor
Carlos Yohn Zubiría can use the following command.
Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Get-MailboxPermission |Select-Object Identity,User,AccessRights
it will show the shared mailbox, user who have the permission and the permission level
- Lewis-HIron ContributorHow to Get a List of Shared Mailboxes Members and Permissions
Connect to Office 365 PowerShell, run the PowerShell ISE as Administrator and execute the following command: ...
Type your user ID and password in the Windows PowerShell Credential Request and click OK. - Paris WellsCopper Contributor
Here is the powershell to get this
Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Get-MailboxPermission | select identity,user,accessrights | where { ($_.User -like '*@*') }
- MemoDTSDCopper Contributor
Paris Wells Thanks Buddy, its working good!! \you help me a lot!
- Sean-MurphyCopper Contributor
Paris Wells Just wanted to say thank you! This worked perfectly. Piped it to Export-CSV, turned that into an XLSX and off to management it goes for review.
Thanks! - Neeraj AilCopper Contributor
Thanks for the script. Can i get a list of send as permissions too along with accessrights?
- kathyCopper Contributor
Neeraj Ail
I hope this will help you.
https://o365reports.com/2020/01/03/shared-mailbox-permission-report-to-csv/
This script exports shared mailbox permissions like full access, send as and send on behalf to CSV file.
The following should work for you:
Get-Mailbox -Filter {recipienttypedetails -eq "SharedMailbox"}
- Carlos Yohn ZubiríaCopper Contributor
Hi Jeremy,
Thanks for your answer but what i get with this command does not shows members of shared mailboxes:
Name Alias Database ProhibitSendQuota ExternalDirectoryObjectI
d
---- ----- -------- ----------------- ------------------------
Leioandi2 Homes leioandi2.homes EURPR09DG154-db059 99 GB (106,300,44... 5c2b2147-3d01-41ce-be...
solicitudcontratos solicitudcon... EURPR09DG045-db096 49.5 GB (53,150,2... 452ac29d-4de9-4305-b4...
pp.sur pp.sur EURPR09DG130-db023 49.5 GB (53,150,2... af168196-d119-4675-8b...Shared mailboxes don't have "members", perhaps you mean a report of users that have been granted Full Access permissions to the shared mailbox? If so, try this script: https://gallery.technet.microsoft.com/Office-365-Mailbox-c2adf0db?redir=0