How to Display/Modify User-Defined Blocked Senders #
Written 08/27/24
PROMPT: You wish to modify a user’s blocked sender list as they claim they are ’not getting mail’ when in reality they ‘blocked the sender’.
Resources: #
Steps: #
- Connect to the tenant via the Exchange Online v3 PowerShell module:
Connect-ExchangeOnlineand then enter the global admin/exchange admin credentials.- If you do not have EXOv3 module, use an elevated window to run
Install-Module -Name ExchangeOnlineManagement(supported in both PowerShell v5/v7)
- If you do not have EXOv3 module, use an elevated window to run
- To get a list of blocked senders, use the following command:
(Get-MailboxJunkEmailConfiguration -Identity user@domain.com).BlockedSendersAndDomains. We can also use.TrustedSendersAndDomainsparameter view trusted senders. - To remove a blocked sender, use the following command:
Set-MailboxJunkEmailConfiguration user@domain.com -BlockedSendersAndDomains @{Remove="emailofblockedsender@domain.com"}and to add a blocked sender, use@{Add="emailofblockedsender@domain.com"}. Lastly, we can swap the-BlockedSendersAndDomainsfor-TrustedSendersAndDomains.