JRB Laptop Outlook Shared Mailboxes and Powershell

Remove Shared Mailbox in Outlook using Windows PowerShell

Open Windows PowerShell as an Administrator and run the following commands

Set-ExecutionPolicy RemoteSigned

$UserCredential = Get-Credential

Login with PRIMARYmailbox Credentials

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session -DisableNameChecking

Replace <SHAREDMailbox> and <PRIMARYMailbox> with respective email addresses in command below

Remove-MailboxPermission -Identity <SHAREDMailbox> -User <PRIMARYMailbox> -AccessRights FullAccess

Confirm Action

Y

Replace <SHAREDMailbox> and <PRIMARYMailbox> with respective email addresses in command below

Add-MailboxPermission -Identity <SHAREDMailbox> -User <PRIMARYMailbox> -AccessRights FullAccess -AutoMapping:$false

Remove-PSSession $Session

Call For Help
(773) 993-1000
JRB Phone ContactThe JRB Team, Inc.

Additional Resources

Connect to Exchange Online PowerShell

How to remove automapping for a shared mailbox in Office 365