

Run the following commands to enable autocompletion for Microsoft Defender for Endpoint on macOS and restart the Terminal session: sudo mkdir -p /usr/local/share/zsh/site-functions If the preceding command does not produce any output, you can enable autocompletion using the following command: echo "autoload -Uz compinit & compinit" > ~/.zshrc To enable autocompletion in bash, run the following command and restart the Terminal session: echo "source /Applications/Microsoft\ Defender.app/Contents/Resources/Tools/mdatp_completion.bash" > ~/.bash_profileĬheck whether autocompletion is enabled on your device: cat ~/.zshrc | grep autoload Mdatp config data_loss_prevention -value Mdatp config enable-file-hash-computation -value Turn on/off archive scanning (on-demand scans only) Mdatp config scan-after-definition-update -value Turn on/off scans after security intelligence updates

Mdatp config maximum-on-demand-scan-threads -value Mdatp config passive-mode -value Ĭonfigure degree of parallelism for on-demand scans Mdatp threat policy set -type potentially_unwanted_application - action audit Mdatp threat policy set -type potentially_unwanted_application - action off

Mdatp threat policy set -type potentially_unwanted_application - action block Remove a threat name from the allowed list Mdatp config cloud-automatic-sample-submission -value Mdatp config real-time-protection -value Important tasks, such as controlling product settings and triggering on-demand scans, can be done from the command line: Group

If an error occurs during installation, the installer will only report a general failure. Restore logging level: mdatp log level set -level info sudo mdatp diagnostic createĭiagnostic file created: "/Library/Application Support/Microsoft/Defender/wdavdiag/932e68a8-8f2e-4ad0-a7f2-65eb97c0de01.zip" To change the directory where diagnostic logs are saved, pass -path to the below command, replacing with the desired directory. By default, diagnostic logs are saved to /Library/Application Support/Microsoft/Defender/wdavdiag/.
