TipsMake
Newest

Instructions on using PowerShell to scan for viruses on Windows

If Windows Defender on your computer cannot scan for viruses, you can use PowerShell to scan Windows for viruses and malware. All processes are performed using commands in PowerShell. Below is a guide on how to use PowerShell to scan your computer for viruses.

 

How to use PowerShell to scan for viruses on Windows

First, search for PowerShell in the Windows search bar. Then, right-click on PowerShell and select Run as administrator.

Instructions on using PowerShell to scan for viruses on Windows Picture 1

Check the security status of Windows.

You need to ensure that the Windows security application is running on your computer. This method will not work if you are using any other security program.

In the PowerShell window, enter the command below.

Get-MpComputerStatus

The command above will list all the details about Windows Security. If the security tool is running on your system, it will show True in the AntivirusEnable field.

Instructions on using PowerShell to scan for viruses on Windows Picture 2

 

Windows security update

If you haven't installed the Windows 11 updates, you'll need to update the Windows Security app manually.

Update-MpSignature

Instructions on using PowerShell to scan for viruses on Windows Picture 3

Run a Full Virus Scan

You can use PowerShell to run a full virus scan on your computer. A full scan will check every file on your Windows computer.

Start-MpScan -ScanType FullScan

Instructions on using PowerShell to scan for viruses on Windows Picture 4

Because a full scan takes time to complete, you can force Windows Security to perform a background scan. To do that, run the following command.

Start-MpScan -ScanType FullScan -AsJob

Instructions on using PowerShell to scan for viruses on Windows Picture 5

Run a quick scan using PowerShell

To run a quick antivirus scan using PowerShell, execute the following command:

Start-MpScan -ScanType QuickScan

Instructions on using PowerShell to scan for viruses on Windows Picture 6

Scan Windows Security Offline

Before scanning offline, save all open files. To run an offline scan via PowerShell, execute the following command.

Start-MpWDOScan

Instructions on using PowerShell to scan for viruses on Windows Picture 7

Discover more
Lesley Montoya
Share by Lesley Montoya
Update 11 March 2026