How to Use PowerShell to Scan Windows for Viruses and Malware

Windows Security is a built-in antivirus program designed to protect your computer from various threats, including viruses, ransomware, spyware, and rootkits. It’s offered for free, eliminating the need for third-party antivirus solutions.

However, if you’re using an unactivated version of Windows 10, you may encounter difficulties when trying to utilize Windows Security. Even if you can open the security app, you might not be able to update its virus definitions.

If you find yourself unable to access Windows Security for any reason, you can use PowerShell as an alternative to scan your system for viruses and malware.

How to Launch PowerShell in Windows

Starting PowerShell on Windows 10 is quite straightforward. Just follow these two steps:

1. Search for “PowerShell” in the Windows Search bar.
2. Right-click on PowerShell and select Run as administrator.

1. Check Windows Security Status

Before proceeding with any scans, you should verify that Windows Security is active on your device. This method won’t work if you’re using a different security program.

In the PowerShell window, run the following command:

powershell
Get-MpComputerStatus

This command will display detailed information about Windows Security. If the antivirus is active, the AntivirusEnable field will show True.

2. Update Windows Security

If you regularly install Windows updates, you may not need to do this step. However, if you haven’t updated your system in a while, you should manually update Windows Security.

Run the following command:

powershell
Update-MpSignature

Read More: How to Fix the Facebook Content Is Not Available Error

3. Run a Full Virus Scan

If it’s been a while since your last scan, it’s advisable to conduct a full antivirus check. PowerShell can initiate a complete scan of your PC, examining every file, which may take some time. To perform a full scan, use the command:

powershell
Start-MpScan -ScanType FullScan

If you’d like to run the full scan in the background to avoid interrupting your work, you can use:

powershell
Start-MpScan -ScanType FullScan -AsJob

4. Execute a Quick Scan Using PowerShell

If you’re short on time or need to minimize the impact on your system’s performance, consider running a Quick Scan instead of a Full Scan. To do this, enter the following command:

powershell
Start-MpScan -ScanType QuickScan

5. Perform a Windows Security Offline Scan

The offline scan feature helps remove stubborn malware that may not be easily detected. However, note that this scan operates from a trusted environment, which means it may close your open files and applications.

Before initiating the offline scan, ensure that you save all your work. To run an Offline Scan via PowerShell, execute:

powershell
Start-MpWDOScan

This guide outlines the steps to use PowerShell for scanning Windows for malware. I hope you find this information helpful! Learn More


Discover more from ugamasontech

Subscribe to get the latest posts sent to your email.

About ugamasontech

Welcome to UgamasonTech! I’m Ugama Stanley Chinedu, the passionate blogger behind this tech haven. With a deep-rooted love for technology and innovation, I explore the latest trends, reviews, and insights to keep you informed and ahead of the curve. Join me on a journey through the ever-evolving tech landscape as we uncover the future together.

View all posts by ugamasontech →

Leave a Reply