locked
Export Mailbox permissions to CSV RRS feed

  • Question

  • I am looking for a powershell script to export mailbox permissions. I have a list of accounts that I know are shared to other users but I want to be able to export all their permissions to a CSV so I can then replicate these permissions in Office 365. I have a script now that pulls every mailbox and its permissions but it is such a mess i would like to be able to pull a file much cleaner they what i have. 

    The one I have now is 

    Get-Mailbox  | Get-MailboxPermission | Select {$_.AccessRights}, Deny, InheritanceType, User, Identity, IsInherited, IsValid | Export-Csv D:\test_permission.csv

    I want to be able to only pull data from the list of mailboxes that i have, and only see accounts/groups that have full mailbox rights. If I could filter out system accounts that would be great as well. i tried modifying this script but had no such luck.

    Thanks!

    Wednesday, June 4, 2014 8:50 PM

Answers

  • Check this if this helps...

    Exchange Powershell Tip #09: How to find who has Full Mailbox access and/or Send As permission on various mailboxes in your environment? Or How to get the list of mailboxes on which someone has Full Mailbox access and/or Send As permission ?


    Blog | Get Your Exchange Powershell Tip of the Day from here

    Wednesday, June 4, 2014 9:25 PM
  • Hi,

    I have a test in my environment using Exchange 2010. You can use the following cmdlet Amit provided to find who has full mailbox access on one or more mailboxes in your environment and export the result to a CSV file.

    Get-Mailbox -ResultSize Unlimited | Get-MailboxPermission | Where {$_.user -notlike "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,@{Name='Access Rights';Expression={[String]::join(‘, ‘, $_.AccessRights)}} | Export-Csv C:\MailboxAccess.csv -NoTypeInformation

    Please change the "C:\MailboxAccess.csv " to the location that you use to save this .csv file.

    Hope it helps.

    Best regards,


    Amy Wang
    TechNet Community Support

    Thursday, June 5, 2014 8:23 AM

All replies

  • Check this if this helps...

    Exchange Powershell Tip #09: How to find who has Full Mailbox access and/or Send As permission on various mailboxes in your environment? Or How to get the list of mailboxes on which someone has Full Mailbox access and/or Send As permission ?


    Blog | Get Your Exchange Powershell Tip of the Day from here

    Wednesday, June 4, 2014 9:25 PM
  • Hi,

    I have a test in my environment using Exchange 2010. You can use the following cmdlet Amit provided to find who has full mailbox access on one or more mailboxes in your environment and export the result to a CSV file.

    Get-Mailbox -ResultSize Unlimited | Get-MailboxPermission | Where {$_.user -notlike "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,@{Name='Access Rights';Expression={[String]::join(‘, ‘, $_.AccessRights)}} | Export-Csv C:\MailboxAccess.csv -NoTypeInformation

    Please change the "C:\MailboxAccess.csv " to the location that you use to save this .csv file.

    Hope it helps.

    Best regards,


    Amy Wang
    TechNet Community Support

    Thursday, June 5, 2014 8:23 AM
  • Hi all,

    is it possible to reverse the command to get out all users that does not have access to shared mailbox instead?

    I used command Amy referred to and it works very well,but im interested in getting all users that does not have access to shared mailbox instead.

    thanks!


    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2work

    Wednesday, September 24, 2014 8:13 AM