Grant Full Access to All Mailboxes

Grant Full Access to All Mailboxes

To Grant full Access to a Mailbox in Office 365 you must first connect to the remote PowerShell, by typing the 3 commands in your local PowerShell:
$o365cred=get-credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $o365cred -Authentication Basic -AllowRedirection
Import-PSSession $session
After you are connected, run the following command to give your admin account full access to all mailboxes:
Get-Mailbox -resultsize unlimited| Add-mailboxpermission -user admin@yourdomain.com -AccessRights FullAccess -Automapping $false
To later remove the permissions, run the following command:
Get-Mailbox -resultsize unlimited| Remove-mailboxpermission -user admin@yourdomain.com -AccessRights FullAccess

Comments

Popular Posts