Disable Spam and Junk Filtering for All Users in Office 365 Using PowerShell with MFA Enabled

Joe Engelking

Ready to Solve Your IT Problems and/or Protect Your Systems?

Here is how to turn off junk and spam filtering in Office 365 for all users

You have to use PowerShell, and it takes a specific set of tools and commands that is rather hard to find with all the different variations of Office 365 setups

1) Connect to Exchange Online with MFA Turned On

Make sure that you are using the latest and most up to date version of the Microsoft Exchange Online PowerShell, you can do that by running this command from Windows Powershell which is installed on your computer


Set-ExecutionPolicy RemoteSigned
Install-Module -Name ExchangeOnlineManagement
Connect-ExchangeOnline

 

2) Disable Spam Filtering for all users with PowerShell

 

Get-Mailbox | Set-MailboxJunkEmailConfiguration –Enabled $False

or

$All = Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited; $All | foreach {Set-MailboxJunkEmailConfiguration $_.Name -Enabled $false}

 

3) Disable Spam Filtering for a single user with Exchange PowerShell

 

If you want to remove spam filtering for just one user enter the command:

Set-MailboxJunkEmailConfiguration user.name -Enabled $false

Leave a Comment

AWARD-WINNING CYBERSECURITY AND I.T. SERVICES

TOP 10% OF ALL REVIEWED I.T. PROVIDERS
UPCITY TOP REVIEWED I.T. PROVIDER
EXPERTISE CURATED TOP PICK
DESIGNRUSH TOP CHICAGO I.T. PROVIDER
RANKED TOP 5 ON GOODFIRM’S TOP CYBERSECURITY PROVIDERS LIST
National IT & Cybersecurity Coverage
Managed IT Services
System Audits/Assessments
Design & Installation
Software Implementation
Custom Software Development
Remote Monitoring
24/7 On-Call Support
Cybersecurity
ISO Consulting
SOC Consulting
HIPAA Consulting
Systems Monitoring
Policy Development
Fraud Prevention
Data Protection
Tools
Download
Contact
Headquarters
Chicago, Illinois
847-496-5196
Schedule a Free Consultation