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.
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.
Windows security update
If you haven't installed the Windows 11 updates, you'll need to update the Windows Security app manually.
Update-MpSignature
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
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 quick scan using PowerShell
To run a quick antivirus scan using PowerShell, execute the following command:
Start-MpScan -ScanType QuickScan
Scan Windows Security Offline
Before scanning offline, save all open files. To run an offline scan via PowerShell, execute the following command.
Start-MpWDOScan