Export Permissions for Shared Mailboxes

For shared mailboxes there are a whole host of reasons why you would want to export all the permissions from Shared Mailboxes. It could be that you are creating a migration strategy to Office 365 and need to know what mailboxes should be migrated with what users. Or...