Microsoft Entra Suite Tech Accelerator
Aug 14 2024, 07:00 AM - 09:30 AM (PDT)
Microsoft Tech Community
SOLVED

How do I copy allow and block lists from one O365 Defender policy

Copper Contributor

I tried this command to extract
Get-HostedContentFilterPolicy -Identity Default | Select-Object -Property AllowedSenderDomains | Out-File -FilePath C:\Users\myuser\Documents\Sender.txt

file does not contain all addresses
through the terminal the output is incomplete

Image Allowed Sender Domains.png

2 Replies
best response confirmed by JoaoManoel-OJC (Copper Contributor)
Solution
Try
Select-Object -ExpandProperty AllowedSenderDomains
instead

@VasilMichev 

 

I am grateful for your help!
the command with the ExpandProperty property viewed all the content within the array

ExpandProperty.png

1 best response

Accepted Solutions
best response confirmed by JoaoManoel-OJC (Copper Contributor)
Solution
Try
Select-Object -ExpandProperty AllowedSenderDomains
instead

View solution in original post