How to use Windows PowerShell to grant an admin access to all user mailboxes in Office 365

Original KB number:   2685435

Summary

This article describes how to use Windows PowerShell to grant an admin access to all user mailboxes in an Office 365 organization through Microsoft Outlook and Outlook Web App.

Resolution

To grant an admin full access to all user mailboxes in Office 365 through Outlook and Outlook Web App, follow these steps:

  1. Connect to Exchange Online by using remote PowerShell.

  2. Type the following command, and then press Enter:

    Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox') -and (Alias -ne 'Admin')} | Add-MailboxPermission -User AdministratorAccount@contoso.com -AccessRights fullaccess -InheritanceType all
    

References

For more information about Exchange Online PowerShell, see Exchange Online PowerShell.

For more information about the Get-Mailbox and Add-MailboxPermission Windows PowerShell cmdlets, see:

Still need help? Go to Microsoft Community.