DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
Redmond desk4 min

How to Check Windows for Malware After Running a Suspicious PowerShell Command

Run an antivirus scan, review its detection history, and consider Microsoft Defender Offline—but understand why a clean scan cannot prove a suspicious PowerShell command did no harm.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start by checking which antivirus is protecting your PC, then run a scan in Windows Security and review Protection history. If you still suspect malware, Microsoft Defender Offline can scan after restarting outside the normal Windows environment. These checks can find recorded or detectable threats, but a clean result cannot prove that an unknown PowerShell command did no harm; the command and the computer’s other evidence matter.

1. Check which antivirus is active

Open Windows Security > Virus & threat protection and check which security provider is listed. If another antivirus is active, check its status and use its scan and detection history too: Microsoft Defender may run in passive or side-by-side mode rather than act as the primary antivirus.

As an Amazon Associate I earn from qualifying purchases.

For a Defender status check, Microsoft documents the Get-MpComputerStatus PowerShell cmdlet. Its AMRunningMode field can report Normal, Passive, EDR Block Mode, or SxS Passive Mode. A passive or side-by-side status means Defender may not be the PC’s primary antivirus. See Microsoft’s Microsoft Defender Antivirus in Windows overview and Get-MpComputerStatus reference.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Run a scan and inspect Protection history

  1. Open Windows Security > Virus & threat protection.
  2. Select Quick scan for an initial check. To choose a broader scan, open Scan options, select Full scan, and start it. The scan choices and labels may vary by Windows version.
  3. When the scan finishes, open Protection history on the Virus & threat protection page. Expand any threat card to see its details and the action Defender took or recommends.

Microsoft says Protection history keeps events for two weeks. Reviewing detailed threat information requires administrator privileges. The page can show Defender detections and actions, potentially unwanted apps removed, and some key services that are turned off. Follow the displayed guidance for a detection; do not allow an item unless you have reliable grounds to identify it as a false positive. See Microsoft’s Protection history guide.

#1 Best Overall
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

A scan with no detection means Defender did not report a threat in that scan; it is not proof that the command was harmless or that the PC is clean. If the scan needs updated security intelligence, Microsoft documents Update-MpSignature for updating Defender’s definitions. More scan and detection cmdlets are listed in Microsoft’s Defender PowerShell reference; recorded detections from Get-MpThreatDetection are not a guarantee that no undetected threat exists.

3. Use Microsoft Defender Offline if concern remains

Defender Offline scans from a trusted environment outside the normal Windows kernel. Microsoft describes it as useful against malware that attempts to bypass the Windows shell, including rootkits. It is an additional detection step, not a guarantee that an incident is resolved.

Rank #2
Yubico - Security Key NFC - Basic Compatibility - Multi-Factor Authentication (MFA) Key, Connect via USB-A or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
  1. Save your work and close open programs. The scan restarts the device.
  2. In Windows Security, go to Virus & threat protection > Scan options.
  3. Select Microsoft Defender Offline scan and start the scan.
  4. After Windows restarts, return to Protection history to review any results.

Microsoft says the scan takes about 15 minutes, though the actual duration can vary. It can also be started from an elevated PowerShell session with Start-MpWDOScan. Microsoft Learn describes the cmdlet as starting a Windows Defender offline scan. See Microsoft Defender Offline scan in Windows and the Start-MpWDOScan reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Review Defender’s event log for context

To check Defender’s recorded events, open Event Viewer and navigate to Applications and Services Logs > Microsoft > Windows > Windows Defender > Operational. Look at events around the time you ran the command and compare them with what you know about activity on the PC.

Rank #3
Yubico - YubiKey 5 NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-A or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
  • Event ID 1117: Microsoft documents this as an action taken to protect the machine.
  • Event ID 5007: A Defender configuration change. An unexpected change is a reason to investigate who or what made it, but the event alone does not prove malware.
  • Event ID 2030: Microsoft’s Offline scan guidance identifies this as an informational event that the scan was configured for the next reboot.

Use the event details and surrounding activity rather than treating an event number as a verdict. Microsoft documents these entries in its Defender Antivirus event IDs and error codes reference.

5. Decide what to do if you still suspect compromise

The checks above report what Defender or another antivirus detected and recorded; they cannot establish what an unspecified PowerShell command executed on a particular PC. Preserve the exact command text and note when you ran it. If this is a work or school device, contact your organization’s IT team. If there are signs of ongoing account or device compromise, seek help from a qualified incident responder. Do not run additional unverified commands copied from a website.

Rank #4
FIDO2 U2F Security Key Passkey Two-Factor Authentication (2FA) USB Key PIN+Touch (Non-Biometric) USB-C Type TrustKey T120
  • Security Key : Protect your online accounts against unauthorized access by using FIDO2 and U2F authentication with T120. It's the world's most protective security key that works with windows, Mac OS, Linux as well as Chrome, Firefox, Edge and many other major browsers.
  • Certified with the new FIDO2 standard, T120 provides the benefit of fast login and strong protection against phishing, account takeover as well as many other online attactks.
  • Works with : Bank of America, Github, Google, Microsoft, DUO, Twitter, Facebook, Dropbox, Apple, ebay, BINANCE, mor and more.
  • Fits USB-C port : Insert the T120 security key into the USB-C port of each service and log in conveniently with one touch
  • For the driver download and user guide, please visit TrustKey Solutions Home support page.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Do you need a USB drive?

No—not for the built-in Microsoft Defender Offline scan on supported Windows versions. Microsoft documents bootable Defender Offline media for the legacy Windows 7 SP1 and Windows 8.1 scenarios; that is a separate recovery path, not a requirement for scanning current supported Windows installations. Microsoft recommends creating that media on a PC that is not infected because malware can interfere with creating it. See Microsoft’s Defender Offline instructions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Yubico - YubiKey 5C NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.