PowerShell: Run a Quick Windows Defender Scan

Need to trigger a quick malware scan without opening the Windows Security app - as part of a script, scheduled task, or manual check? This one-liner starts it directly from the terminal.

Prerequisites:

  • Privileges: None
  • Module: Built-in, no import needed

Quick Command:

Start-MpScan -ScanType QuickScan
📦
Want all of them at once?
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.

How It Works:

  • Start-MpScan triggers a Windows Defender scan directly through PowerShell, without needing to open the Windows Security GUI.
  • -ScanType QuickScan specifies a quick scan - which checks the most common locations malware is likely to hide (running processes, startup folders, registry) rather than the entire disk.
  • By default, this produces no output while running - use Get-MpComputerStatus afterward to confirm the scan completed and check the updated QuickScanEndTime.