# Windows Defender

{% hint style="danger" %}
**Note:** If Tamper protection is enabled you will not be able to turn off Defender by CMD or PowerShell. You can however, still **create an exclusion.**
{% endhint %}

**Disable real time monitoring**

```powershell
Set-MpPreference -DisableRealtimeMonitoring $true
```

**Disable scanning for downloaded files (more silent and preferred)**

```powershell
Set-MpPreference -DisableIOAVProtection $true
```

**Create an exclusion**

```powershell
Add-MpPreference -ExclusionPath "C:\Windows\Temp"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://0x2irix.gitbook.io/0x2irix/integrations/active-directory/bypassing/bypassing-defenses/windows-defender.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
