# Exchange Online PS help

**URL:** <https://forums.powershell.org/t/exchange-online-ps-help/17885>\
**Category:** PowerShell Help\
**Created:** [November 6, 2021, 7:52am UTC](https://forums.powershell.org/t/exchange-online-ps-help/17885 "2021-11-06T07:52:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tangomango](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@tangomango](https://forums.powershell.org/u/tangomango)\
**Post date:** [November 6, 2021, 7:52am UTC](https://forums.powershell.org/t/exchange-online-ps-help/17885/1 "2021-11-06T07:52:54Z")

</div>

Hi!

I can’t figure these out and hoping someone can help me out.

![Picture1](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/f/f4cb40e5473efc67e80d0c5d2158aa80c82e0345.png)  
I’m trying to get the “notify recipients when messages are quarantined as malware”.  
This is what I’ve got and have tried the other flags…  
Set-MalwareFilterPolicy -Identity “Default” -EnableFileFilter 1

Thanks!

---

<div class="post-metadata">

**Author:** ![matt-bloomfield](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@matt-bloomfield](https://forums.powershell.org/u/matt-bloomfield)\
**Post date:** [November 6, 2021, 9:25pm UTC](https://forums.powershell.org/t/exchange-online-ps-help/17885/2 "2021-11-06T21:25:12Z")

</div>

Hi, welcome to the forum 👋

You haven’t provided enough information for anyone to help you. You say:

> [@tangomango](#):
>
> I’m trying to **get** the “notify recipients when messages are quarantined as malware”.

But you’re using a `Set` command, not a `Get` command (`Get-MailwareFilterPolicy`).

Please let us know what you are trying to do and what error messages (if any) you’re receiving.

When posting code and error messages, please make sure to use the Preformatted text button \</\>.

---

<div class="post-metadata">

**Author:** ![tangomango](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@tangomango](https://forums.powershell.org/u/tangomango)\
**Post date:** [November 7, 2021, 12:44pm UTC](https://forums.powershell.org/t/exchange-online-ps-help/17885/3 "2021-11-07T12:44:16Z")

</div>

Hi Matt and thank you.

I am trying to turn on the setting “notify recipients when messages are quarantined as malware” in the default anti-malware policy.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/2/2691c63aa3bc0c2d3f9a1534542de17212beb156.png)

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [November 7, 2021, 2:16pm UTC](https://forums.powershell.org/t/exchange-online-ps-help/17885/4 "2021-11-07T14:16:05Z")

</div>

Just out of curiosity - why does it have to be with PowerShell? If I got it right it is one click and you’re done.

---

<div class="post-metadata">

**Author:** ![tangomango](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@tangomango](https://forums.powershell.org/u/tangomango)\
**Post date:** [November 7, 2021, 4:43pm UTC](https://forums.powershell.org/t/exchange-online-ps-help/17885/5 "2021-11-07T16:43:25Z")

</div>

Hi Olaf. Yes, you’re right about it being one click and done. In this case, I will use this one with more commands in many environments.

---

<div class="post-metadata">

**Author:** ![matt-bloomfield](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@matt-bloomfield](https://forums.powershell.org/u/matt-bloomfield)\
**Post date:** [November 7, 2021, 11:07pm UTC](https://forums.powershell.org/t/exchange-online-ps-help/17885/6 "2021-11-07T23:07:30Z")

</div>

From looking at the help, I suspect it’s this:

```auto
Set-MalwareFilterPolicy -Name 'Default' -Action 'DeleteAttachmentAndUseDefaultAlert'

```

> DeleteAttachmentAndUseDefaultAlert: Delivers the message, but replaces all attachments with a file named Malware Alert Text.txt that contains the default alert text. **In the cloud-based service, the message with the original attachments is also quarantined.**

> **[Set-MalwareFilterPolicy (ExchangePowerShell)](https://learn.microsoft.com/en-us/powershell/module/exchange/set-malwarefilterpolicy?view=exchange-ps)**
>
> You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the...

---

<div class="post-metadata">

**Author:** ![tangomango](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@tangomango](https://forums.powershell.org/u/tangomango)\
**Post date:** [November 8, 2021, 1:50am UTC](https://forums.powershell.org/t/exchange-online-ps-help/17885/7 "2021-11-08T01:50:06Z")

</div>

Spot on. Thank you Matt!

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:20pm UTC](https://forums.powershell.org/t/exchange-online-ps-help/17885/8 "2024-05-16T20:20:36Z")

</div>


