something exciting

Some information about the exciting thing

Table of contents generated with markdown-toc


PowerShell script to export Exchange Mailbox permissions.

The script exports the Mailbox permissions within your Exchange organization.

Optional parameter. Exports the results to file.

Gets Mailbox permissions report for Exchange outputs the results to the screen

.\Get-MailboxPermissionsExport.ps1 -File FileName.csv
Gets Mailbox permissions report for Exchange and exports the results to FileName.csv file.

Script author Luke Leigh -


    [Parameter(Mandatory = $False)]



    $outPut = @()
    $mailBoxes = Get-Mailbox # | Where-Object { $_.WindowsEmailAddress -like '*specific-domain*' }
    foreach ($mailBox in $mailBoxes) {
        $perms = Get-MailboxPermission $mailBox.Identity | Where-Object { $_.User -notlike "Anonymous" -and $_.User -notlike "Default" }
        foreach ($perm in $perms) {
            if (!$perm) { break }
            $properties = @{
                "Identity"     = $mailbox.Name;
                "User"         = $perm.User;
                "AccessRights" = $perm.AccessRights -join ','
            $Obj = New-Object -TypeName PSObject -Property $Properties

            if (!$File) {
                Write-Output $Obj
            $outPut += $Obj
    if ($File) {
        $outPut | Export-Csv -NoTypeInformation $File



Back to Top


Please feel free to copy parts of the script or if you would like to download the entire script, simple click the download button. You can download the complete repository in a zip file by clicking the Download link in the menu bar on the left hand side of the page.

Report Issues

You can report an issue or contribute to this site on GitHub. Simply click the button below and add any relevant notes. I will attempt to respond to all issues as soon as possible.


Back to Top