Forum Discussion
Listing shared mailboxes and members - Powershell
Here is the powershell to get this
Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Get-MailboxPermission | select identity,user,accessrights | where { ($_.User -like '*@*') }
- MemoDTSDApr 03, 2020Copper Contributor
Paris Wells Thanks Buddy, its working good!! \you help me a lot!
- Sean-MurphyOct 16, 2019Copper 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 AilJan 28, 2019Copper Contributor
Thanks for the script. Can i get a list of send as permissions too along with accessrights?
- kathyJan 03, 2020Brass 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. - JeremyMillerJan 28, 2019MVPYou can see sendas permissions using the Get-RecipientPermission cmdlet.
- Neeraj AilJan 28, 2019Copper Contributor
thanks it worked.
Get-RecipientPermission -Identity "mailbox" -AccessRights sendas | where {($_.trustee -like '*@*') }
- Danver2019Jan 12, 2019Copper Contributor
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!
- Gowher_BhatSep 17, 2021Copper Contributor
Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Get-MailboxPermission | select identity,user,accessrights | where { ($_.User -like '*@*') } | Export-csv -path D:\Gowher.CSV
- Mr_StarkFeb 01, 2019Copper Contributor
What I do is sending the results to a txt file, just adding :
>myfilename.txt
at the end of the sentence.
- Chico8LocoSep 13, 2019Copper ContributorYou can pipe the result to a csv file Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Get-MailboxPermission | select identity,user,accessrights | where { ($_.User -like '*@*') } | Export-Csv -path -NoTypeInformation more info bout export-csv can be found here: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/export-csv?view=powershell-6