API Reference
Command
Set-CxDefenderSampleConsent
Sets the Microsoft Defender sample submission consent level on a computer.
Examples
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
- Defender sample submission consent level to apply. Possible values: AlwaysPrompt, SendSafe, NeverSend, SendAll
- Possible values:
AlwaysPrompt,SendSafe,NeverSend,SendAll - ComputerName string
- Target computer name. Use . for the local machine or provide a DNS/NetBIOS name. When omitted, the local computer is queried.