When you purchase through links on our site, we may earn an affiliate commission.Heres how it works.

Thishow-to guidewill walk you through the essential commands to control the Windows 11 antivirus with PowerShell.

(This command may take a few moments to run.)

Defender Antivirus PowerShell commands

Defender Antivirus PowerShell commands

After you complete the steps, the antivirus will perform a full scan on Windows 11.

This scan will restart the computer.

As a result, it’s recommended to store your files and close your applications before proceeding.

Get-MpComputerStatus

(This option only works for threats the Microsoft Defender Antivirus hasn’t already mitigated.)

you could always remove the exclusion using theRemove-MpPreference -ExclusionPath “PATH\TO\FOLDER"command.

In the command, remember to set the exclude path you want to remove.

Update-MpSignature

Exclude file bang out

The Defender Antivirus also includes an option to exclude specific file types.

For instance, this command excludes the Microsoft Excel files from being scanned:Set-MpPreference -ExclusionExtension xlsx.

you could always remove the exclusion using theRemove-MpPreference -ExclusionExtension EXTENSIONcommand.

Defender quick scan command

In the command, remember to set the exclude extension you want to remove.

For instance, this command schedules a full scan at 3:00 am, local time:Set-MpPreference -RemediationScheduleTime 03:00:00.

However, if you have a good reason, it’s possible to disable this feature.

Defender full scan command

you’re able to always revert the behavior with theSet-MpPreference -DisableArchiveScanning $falsecommand.

you’re free to always revert the behavior with theSet-MpPreference -DisableScanningMappedNetworkDrivesForFullScan $truecommand.

Defender custom scan command

Remove-MpThreat

Get-MpPreference

Set-MpPreference ExclusionPath

Set-MpPreference ExclusionExtension

Defender set quarantine days

Defender quick scan schedule

Defender full scan schedule command

Defender disable real-time protection command

Defender enable external storage command

Defender disable zip scan command

Defender enable network folder scan command

Microsoft Windows 11 Pro…

Windows 11 Pro Upgrade, from…

Download Microsoft Windows…

Dell

Windows 11 Defender file manual scan

PowerShell basic commands

Windows 11 powercfg commands

Windows 11 set shutdown time

Windows 11 msconfig

Windows 10 create scheduled task with PowerShell

Windows 11 system features

Windows 11 Start menu

Windows 11 battery usage

Copilot Vision for Windows announcement

Xbox controller with WD-40

Elden Ring Nightreign

The rare Caine Trailblazer operator skin, obtainable from the Return to Verdansk event in Call of Duty: Warzone

Dune: Awakening

DOOM: The Dark Ages

Moto book 60