TestimoX

API Reference

Command

Set-CxDefenderSampleConsent

Namespace ComputerX.PowerShell

Sets the Microsoft Defender sample submission consent level on a computer.

Examples

Authored help example

Example 1: Configures the local machine to send safe samples automatically.

PS>


Set-CxDefenderSampleConsent -Level SendSafeSamples
        

Example 2: Configures a remote server to always prompt before sample submission.

PS>


Set-CxDefenderSampleConsent -ComputerName APP-SEC-01 -Level AlwaysPrompt
        

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-CxDefenderSampleConsent -Level <AlwaysPrompt|SendSafe|NeverSend|SendAll> [-ComputerName <string>] [<CommonParameters>]
#

Parameters

Level SubmitSamplesConsentLevel requiredposition: 0pipeline: falsevalues: 4
Defender sample submission consent level to apply. Possible values: AlwaysPrompt, SendSafe, NeverSend, SendAll
Possible values: AlwaysPrompt, SendSafe, NeverSend, SendAll
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.