TestimoX

API Reference

Command

Set-CxDefenderRealtime

Namespace ComputerX.PowerShell

Enables or disables Microsoft Defender real-time protection on a computer.

Examples

Authored help example

Example 1: Disables local real-time protection during a controlled maintenance window.

PS>


Set-CxDefenderRealtime -Enabled $false
        

Example 2: Re-enables real-time protection on a remote server after maintenance completes.

PS>


Set-CxDefenderRealtime -ComputerName APP-SEC-01 -Enabled $true
        

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-CxDefenderRealtime -Enabled <bool> [-ComputerName <string>] [<CommonParameters>]
#

Parameters

Enabled bool requiredposition: 0pipeline: false
Set to $true to enable real-time protection or $false to disable it.
ComputerName string optionalposition: 1pipeline: false
Target computer name. Use . for the local machine or provide a DNS/NetBIOS name. When omitted, the local computer is queried.