Create Office 365 Safe Attachments Policy and Safe attachment Rule using PowerShell

0
19
views

Create Office 365 Safe Attachments Policy and Safe attachment Rule using PowerShell

To get started with creating the Safe attachment policy and safe attachment rule a connection to Exchange Online Protection needs to be established.

To establish a connection to Exchange Online Protection (EOP), follow the below.

Then import the new session

Now that a connection to EXO EOP has been established let’s start with creating the Safe Attachment Policy.

The new Policy, will do the following:

  • The policy is enabled.
  • The action is Replace. Note: the default value for the Action parameter is Block, if you want to block then you don’t have to specify an Action Parameter.
  • If Safe Attachments scanning isn’t available or encounters errors, deliver the message as normal. The default value of the ActionOnError parameter is $false, so you don’t need to specify it.
  • Redirect detected malware messages to secure@thatlazyadmin.com.

A screenshot of a cell phone
Description automatically generated

Now that a new Safe Attachment Policy has been created, we also need to go ahead and create a new Safe Attachment rule with it.

The new Safe Attachment Rule will do the following:

  • The rule is associated with the Safe Attachments policy named Accounts Replace Attachments.
  • The rule applies to members of the group named Accounts
  • The rule doesn’t apply to members of the group named Accounts Department Managers.

A screenshot of a cell phone
Description automatically generated

Sharing is caring!

Previous articleCreate a Microsoft Teams Live event
Next articleCreating an Office 365 Safe Links Policy.
About Me ? I Guess i would start by saying i am a family guys and full time SysAdmin and Tech Junky. This Blog is my first attempt to share information about daily issues i come across as a SysAdmin as well as some new deployments i am part of. Topics that i will cover will mostly be about Office 365,Windows,Exchange as well as Active Directory. I hope some of my Blog posts helps someone #LiveLongAndBeLazy #Exchange #Office 365 #ActiveDirectory #Hyper-V
SHARE

LEAVE A REPLY

Please enter your comment!
Please enter your name here