COMMAND EVERYTHING.
Gets active and past malware threats that Windows Defender detected.
Networking / Security · Risk: Low · Documentation VerifiedLast verified: 2026-10-26
Microsoft Defender reference: Gets active and past malware threats that Windows Defender detected. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Get-MpThreatDetection [<CommonParameters>]Copied 0 timesUse an account with the target resource permissions documented for Get-MpThreatDetection. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Windows / Defender · Windows Server 2025 documentation; feature/module prerequisites apply
-AsJob-CimSession-ThreatID-ThrottleLimitWindows with the Defender module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
This is a read-oriented cmdlet; protect any sensitive results and check the documented effects of your selected parameters.
Get-MpThreatDetectionThis command returns the list of past malware detections for the local computer. Error codes The following table lists the hexadecimal and decimal error codes for this cmdlet. Each hexadecimal error code has a 0x8050 prefix. Therefore, an ERROR_MP_BAD_SCANID error corresponds to error code 0x80508012. Additionally, an ERR_MP_REMOVE_FAILED error corresponds to error code 0x80508017. For a list of error codes, along with possible reasons and resolutions, see Windows Defender Antivirus client error codes in the topic Review event logs and error codes to troubleshoot issues with Windows Defender Antivirus. |Symbolic Name | Error Number (hexadecimal) | Error number (decimal) | |------------------------------------|----------------------------|------------------------| |ERROR_MP_UI_CONSOLIDATION_BASE | 0x80501000 | 2142236672 | |ERROR_MP_ACTIONS_FAILED | 0x80501001 | 2142236671 | |ERROR_MP_BAD_INIT_MODULES | 0x80508001 | 2142207999 | |ERROR_MP_BAD_DATABASE | 0x80508002 | 2142207998 | |ERROR_MP_BAD_UFS | 0x80508004 | 2142207996 | |ERROR_MP_NO_MEMORY | 0x80508007 | 2142207993 | |ERROR_MP_BAD_INPUT_DATA | 0x8050800C | 2142288079 | |ERROR_MP_BAD_GLOBAL_STORAGE | 0x8050800D | 2142207987 | |ERROR_MP_OBSOLETE | 0x8050800E | 2142207986 | |ERROR_MP_NOT_SUPPORTED | 0x8050800F | 2142207985 | |ERROR_MP_NO_MORE_ITEMS | 0x80508010 | 2142207984 | |ERROR_MP_DUPLICATE_SCANID | 0x80508011 | 2142207983 | |ERROR_MP_BAD_SCANID | 0x80508012 | 2142207982 | |ERROR_MP_BAD_USERDB_VERSION | 0x80508013 | 2142207981 | |ERROR_MP_RESTORE_FAILED | 0x80508014 | 2142207980 | |ERROR_MP_FAILED_TO_SPYNET | 0x80508015 | 2142207979 | |ERROR_MP_BAD_ACTION | 0x80508016 | 2142207978 | |ERROR_MP_REMOVE_FAILED | 0x80508017 | 2142207977 | |ERROR_MP_SCAN_ABORTED | 0x80508018 | 2142207976 | |ERROR_MP_NOT_FOUND | 0x80508019 | 2142207975 | |ERROR_MP_BAD_CONFIGURATION | 0x80508020 | 2142207968 | |ERROR_MP_QUARANTINE_FAILED | 0x80508021 | 2142207967 | |ERROR_MP_REBOOT_REQUIRED | 0x80508022 | 2142207966 | |ERROR_MP_THREAT_NOT_FOUND | 0x80508023 | 2142207965 | |ERROR_MP_FULL_SCAN_REQUIRED | 0x80508024 | 2142207964 | |ERROR_MP_MANUAL_STEPS_REQUIRED | 0x80508025 | 2142207963 | |ERROR_MP_REMOVE_NOT_SUPPORTED | 0x80508026 | 2142207962 | |ERROR_MP_REMOVE_LOW_MEDIUM_DISABLED | 0x80508027 | 2142207961 | |ERR_MP_RESCAN_REQUIRED | 0x80508029 | 2142207959 | |ERROR_RELO_BAD_EHANDLE | 0x80509001 | 2142203903 | |ERROR_RELO_KERNEL_NOT_LOADED | 0x80509003 | 2142203901 | |ERROR_MP_BADDB_OPEN | 0x8050A001 | 2142199807 | |ERROR_MP_BADDB_HEADER | 0x8050A002 | 2142199806 | |ERROR_MP_BADDB_OLDENGINE | 0x8050A003 | 2142199805 | |ERROR_MP_BADDB_CONTENT | 0x8050A004 | 2142199804 | |ERROR_MP_BADDB_NOTSIGNED | 0x8050A005 | 2142199803 | Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.
Sign in to keep your own command reference lists.
Explain or customize this command with AI