Step 1 – Close Outlook
Close Outlook completely.
In Task Manager, make sure there are no Outlook.exe or MSOSYNC.exe processes still running. End them if there are.
Step 2 – Add the registry flag to stop Outlook talking to Microsoft 365
Set the ExcludeExplicitO365Endpoint flag under Outlook’s AutoDiscover key.
- Press Start, type PowerShell.
- Right-click Windows PowerShell → Run as administrator (or at least run it as the same Windows user who uses Outlook).
- In the blue PowerShell window, paste the following and press Enter:
# Make sure the AutoDiscover key exists
New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\AutoDiscover" -Force | Out-Null
# Tell Outlook to exclude the Office 365 endpoint
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\AutoDiscover" `
-Name 'ExcludeExplicitO365Endpoint' -Value 1 -Type DWORD -Force
4.You shouldn’t see any errors; it will just return to the prompt. Close PowerShell.
Step 3 – Restart the PC
Step 4 – Create a fresh Outlook profile to your hosted Exchange
After the reboot:
Open Control Panel → Mail → Show Profiles….
Remove the old problem profile(s) (the ones that were using the temporary mailbox).
- Click Add…, name it something like "New".
- Enter:
- Your Name: Your Name
- Email Address: ******@domain.com
- Let the automatic setup run. With the new registry flag in place, Outlook should now ignore Microsoft 365 and use your hosted exchange environment instead.
If it finishes without the “name cannot be matched” error:
Start Outlook using this new profile.
- Go to File → Account Settings → Account Settings… and check:
- Only your ******@domain.com Exchange account is listed, and
You should then see your full mailbox and be able to send/receive as ******@domain.com again.