Powershell script to add an email in the Office 365 Security and Compliance Block List
I would like to use a script, preferably a PowerShell script to prompt for an email address and then add that email address to the Office 365 Security and Compliance Defaul spam filter policy Block Sender list. Is this possible? Thanks in advance.
PowershellMicrosoft OfficeMicrosoft 365AntiSpamScripting Languages
Last Comment
E=mc2
8/22/2022 - Mon
Jose Gabriel Ortega Castro
It's not possible. You have two options:
* Fill it up manually on the O365 S&C (security and compliance) * Or manage the Default Spam Policy for everyone (mailbox by mailbox, but there's a cmdlet that does it all for everyone):
You have two options:
* Fill it up manually on the O365 S&C (security and compliance)
* Or manage the Default Spam Policy for everyone (mailbox by mailbox, but there's a cmdlet that does it all for everyone):
https://docs.microsoft.com/powershell/module/exchange/set-mailboxjunkemailconfiguration?view=exchange-ps
To a Single User:
Open in new window
To the whole companyOpen in new window