How to Use PowerShell To Scan Windows for Virus & Malware

Windows 10 is indeed a great operating system that’s powering most PCs and laptops. Windows 10 offers you more features and options than every other desktop operating system. Microsoft also provides users with a free antivirus tool known as Microsoft Defender Antivirus.

For those who don’t know, Microsoft Defender Antivirus is a part of the Windows Security experience that provides your computer with viruses, ransomware, spyware, rootkits, and more. It comes for free, replacing the need for a professional antivirus tool.

However, if you are running an unactivated version of Windows 10, you might face problems using the Defender antivirus. Even if you can access Microsoft Defender, you can’t update its virus database. So, if you are also dealing with the same problems, you have landed on the right webpage.

Also Read: 4 Best Ways To Reset Firewall Settings in Windows 10

Use PowerShell To Scan Windows 10

In this guide, we will share the best method to run Microsoft Defender directly from Powershell. You can use Powershell to scan Windows 10 for malware. You need to use few commands, which we will list in this guide. So, let’s check out how to use Powershell to scan Windows 10 for malware.

How to Launch Powershell in Windows 10?

It’s relatively easy to launch Powershell on Windows 10 computers. You need to follow the two steps below to launch Powershell on Windows 10.

Powershell

  • Search for Powershell on Windows Search.
  • Right-click on Powershell and select Run as administrator.

1. Check Defender Status

Before following the next methods, you need to ensure that Microsoft Defender is running on your device. If you are using any other security program other than Microsoft Defender, this method won’t work. You need to disable all third-party security suites to scan the computer with Microsoft Defender.

On the Powershell Window, you need to execute the command given below.

Get-MpComputerStatus

Check Defender Status

The above command will list every detail of Microsoft Defender. If the Microsoft Defender is running on your system, it would show ‘True’ on the AntivirusEnable field.

2. Update Microsoft Defender

If you timely install all Windows 10 updates, you don’t need to follow this method. However, if you don’t update Windows 10, then yo might need to update the Microsoft Defender application. To update Microsoft defender, execute the command –

Update-MpSignature

Update Microsoft Defender

3. Running a Full Virus Scan

If you haven’t scanned your computer for a while, it’s best to run a full antivirus scan. You can rely on Powershell to run a full Antivirus scan on your PC. The full scan checks every file on your Windows PC; hence, it takes time to complete the full scan. To perform a full antivirus scan, execute the command-

Start-MpScan -ScanType FullScan

Running a Full Virus Scan

Since the full scan takes time to complete, you can force Microsoft defender to perform the scan in the background. To do that, execute the command.

Start-MpScan -ScanType FullScan -AsJob

Microsoft defender to perform the scan

4. Run a Quick Scan using PowerShell

Well, the Full Scan takes time to complete, and it slows down your device. You can use the Quick Scan feature of Microsoft defender in that case. To run a Quick Antivirus scan using Powershell, execute the command given below and hit the enter button.

Start-MpScan -ScanType QuickScan

Run a Quick Scan using PowerShell

5. Run Defender Offline Scan

For those who don’t know, Microsoft Defender also has an offline scan functionality that removes malware that is difficult to detect. However, the offline scan runs from a trusted environment. That means you might lose your current work. So, before running the offline scan, make sure to save all of your opened files. To run Microsoft Defender Offline Scan via Powershell, execute the command –

Start-MpWDOScan

Run Defender Offline Scan

So, this guide is all about how to use PowerShell to scan Windows 10 for malware. I hope this article helped you! Please share it with your friends also. If you have any doubts about this, let us know in the comment box below.

LEAVE A REPLY

Please enter your comment!
Please enter your name here