TestimoX

API Reference

Command

Set-CxDefenderExclusion

Namespace ComputerX.PowerShell

Adds or replaces Microsoft Defender exclusion entries on a computer.

Examples

Authored help example

Example 1: Adds SQL Server database file and process exclusions on the local computer.

PS>


Set-CxDefenderExclusion -Path 'D:\SQLData','E:\SQLLogs' -Process 'sqlservr.exe' -Extension 'mdf','ldf'
        

Example 2: Replaces the exclusion path list on a remote server with a controlled baseline.

PS>


Set-CxDefenderExclusion -ComputerName APP-SEC-01 -Path 'D:\Apps','D:\Telemetry' -Replace
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Set-CxDefenderExclusion [-Path <string[]>] [-Process <string[]>] [-Extension <string[]>] [-ComputerName <string>] [-Replace] [<CommonParameters>]
#

Parameters

Path string[] optionalposition: 0pipeline: false
File or folder paths to exclude from Microsoft Defender scans.
Process string[] optionalposition: 1pipeline: false
Process image names to exclude (e.g., 'sqlservr.exe').
Extension string[] optionalposition: 2pipeline: false
File extensions (without dot), e.g., 'ldf','mdf','vhdx'.
ComputerName string optionalposition: namedpipeline: false
Target computer name. Use . for the local machine or provide a DNS/NetBIOS name. When omitted, the local computer is queried.
Replace SwitchParameter optionalposition: namedpipeline: false
Replace existing lists instead of merging with them.