This document describes useful Command Prompt and PowerShell commands for opening Windows Defender (Windows Security) pages and managing exclusions.
To directly open the Windows Defender Exclusions screen from Command Prompt:
start windowsdefender://exclusions
This navigates to:
Windows Security → Virus & threat protection → Exclusions
Open the main Windows Security application:
start windowsdefender:
Open Virus & Threat Protection:
start windowsdefender://threat
Open Protection History:
start windowsdefender://history
You can add exclusions directly using PowerShell commands (invoked from CMD if desired).
Add a folder or file exclusion:
powershell -command "Add-MpPreference -ExclusionPath 'C:\Your\Path'"
Add a process exclusion:
powershell -command "Add-MpPreference -ExclusionProcess 'yourapp.exe'"