Can we export Office 365 Spam filter allow and block lists? If so, how?

Yes, you can use Powershell to export Office 365 span filter allow and block list to a csv. Here are some examples:

Export blocked domain name list:

Get-HostedContentFilterPolicy | select -ExpandProperty BlockedSenderDomains | Select-Object @{Name=’Domain’;Expression={$_}} | Export-Csv .\blockeddomains.csv -NoType

Export bloced senders list

Get-HostedContentFilterPolicy | select -ExpandProperty BlockedSenders | Select-Object @{Name=’Domain’;Expression={$_}} | Export-Csv .\blockedsenders.csv -NoType

Export allow senders lsits

Get-HostedContentFilterPolicy | select -ExpandProperty AllowedSenders | Select-Object @{Name=’Domain’;Expression={$_}} | Export-Csv .\allowed.csv -NoType

Export allow domain name list

Get-HostedContentFilterPolicy | select -ExpandProperty AllowedSenderDomains | Select-Object @{Name=’Domain’;Expression={$_}} | Export-Csv .\alloweddomains.csv -NoType

Note: you may login remotely first:

Set-ExecutionPolicy RemoteSigned

Install-Module -Name ExchangeOnlineManagement

Import-Module ExchangeOnlineManagement

Connect-ExchangeOnline -UserPrincipalName blin@chicagotech.net

Published by

Bob Lin

Bob Lin, Chicagotech-MVP, MCSE & CNE Data recovery, Windows OS Recovery, Networking, and Computer Troubleshooting on http://www.ChicagoTech.net How to Install and Configure Windows, VMware, Virtualization and Cisco on http://www.HowToNetworking.com