Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Use PowerShell to Scan for Viruses on Windows

Learn how to use PowerShell to scan for viruses on Windows with practical instructions, useful tips, and troubleshooting guidance for common issues.

Table of Contents

Learn how to use PowerShell to scan for viruses on Windows with practical instructions, useful tips, and troubleshooting guidance for common issues.

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.

How to Use PowerShell to Scan for Viruses on Windows screenshot for Use PowerShell to Scan for Viruses on Windows

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.

Check the Security Status of Windows screenshot for Use PowerShell to Scan for Viruses on Windows (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

Windows Security Update screenshot for Use PowerShell to Scan for Viruses on Windows (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

Run a Full Virus Scan screenshot for Use PowerShell to Scan for Viruses on Windows (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

Run a Full Virus Scan screenshot for Use PowerShell to Scan for Viruses on Windows (5)

Run a Quick Scan Using PowerShell

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

Start-MpScan -ScanType QuickScan

Run a Quick Scan Using PowerShell screenshot for Use PowerShell to Scan for Viruses on Windows (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

Scan Windows Security Offline screenshot for Use PowerShell to Scan for Viruses on Windows (7)

FAQ

What is the best way to use powershell to scan for viruses on windows?

Learn how to use PowerShell to scan for viruses on Windows with practical instructions, useful tips, and troubleshooting guidance for common issues.

What should you prepare before you use powershell to scan for viruses on windows?

Key takeaway: Learn how to use PowerShell to scan for viruses on Windows with practical instructions, useful tips, and troubleshooting guidance for common issues.

What common mistakes should you avoid?

If Windows Defender on your computer cannot scan for viruses, you can use PowerShell to scan Windows for viruses and malware.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.