Sep 04 2018
07:59 AM
- last edited on
Feb 01 2023
11:55 AM
by
TechCommunityAP
Sep 04 2018
07:59 AM
- last edited on
Feb 01 2023
11:55 AM
by
TechCommunityAP
Hi,
Does anyone knows how to get a list of shared mailboxes and members with powershell?
Thanks in advance,
Regards
Sep 04 2018 08:09 AM
The following should work for you:
Get-Mailbox -Filter {recipienttypedetails -eq "SharedMailbox"}
Sep 04 2018 09:22 AM
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...
Sep 04 2018 11:34 AM
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
Sep 04 2018 01:52 PM
Sep 04 2018 01:55 PM
Sep 04 2018 02:01 PM
If you are just looking for a quick and dirty list, this may help. Otherwise the script that Vasil pointed you to should also work.
Get-Mailbox -Filter {recipienttypedetails -eq "SharedMailbox"} | Get-Mailboxpermission
Sep 05 2018 01:14 AM
Hi Jeremy,
This Will be enough for me, if i reach to format results.
Thanks.
Regards,
Nov 01 2018 02:10 AM
Here is the powershell to get this
Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Get-MailboxPermission | select identity,user,accessrights | where { ($_.User -like '*@*') }
Jan 11 2019 04:12 PM
@Paris Wells wrote:Here is the powershell to get this
Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Get-MailboxPermission | select identity,user,accessrights | where { ($_.User -like '*@*') }
Can you add a way to export the result to an Excel file. Would really appreciate it. Thanks!
Jan 28 2019 12:24 AM
Thanks for the script. Can i get a list of send as permissions too along with accessrights?
Jan 28 2019 02:11 AM
Jan 28 2019 03:49 AM
thanks it worked.
Get-RecipientPermission -Identity "mailbox" -AccessRights sendas | where {($_.trustee -like '*@*') }
Feb 01 2019 12:51 PM
What I do is sending the results to a txt file, just adding :
>myfilename.txt
at the end of the sentence.
Sep 12 2019 07:20 PM - edited Sep 12 2019 07:36 PM
Oct 16 2019 01:50 PM
@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!
Jan 03 2020 03:05 AM
@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.
Apr 03 2020 09:01 AM
@Paris Wells Thanks Buddy, its working good!! \you help me a lot!
Apr 03 2020 09:14 AM
Sep 16 2020 12:19 PM
@Neeraj Ail It worked perfectly. Thank you!!!