Windows Defender Quarantine: View, Remove or Restore a File

Updated on:

Windows Defender quarantine illustration

To find files quarantined by Windows Defender, open Windows Security > Virus & threat protection > Protection history. Filter for Quarantined items and expand the detection. You can remove the item or restore it after verifying that the detection was a mistake.

If you’re looking for a job on a managed device, jump to the Defender for Endpoint Action center steps.

Find quarantined files in Windows 11 or Windows 10

  1. Search Start for Windows Security and open it.
  2. Select Virus & threat protection, then Protection history.
  3. Open Filters and choose Quarantined items if the option is available.
  4. Expand the entry and check the date, threat name and Affected items. The affected item can show the file’s original path. Windows may ask for administrator approval to show the details.

If the filter shows no match, clear it and check the other entries. Threat blocked means Defender already removed the threat. A separate antivirus may have its own quarantine. See Microsoft’s guide to Protection history.

Restore or remove a quarantined file

Before restoring, check where the file came from and whether the genuine publisher provides a clean copy, a digital signature or a checksum to compare. Ask the publisher or your IT team about the exact detection if you’re unsure. Leave the file quarantined while you check. Our guide to the “virus detected” message helps you identify what blocked it.

  • Restore a verified file. Expand the matching Threat quarantined card and select Actions > Restore. Confirm the prompt and check the original location listed under Affected items. Defender can flag the file again.
  • Remove a file you don’t need. Expand the matching card and select Actions > Remove. Confirm the removal. If you later need that file, look for a clean copy from the publisher or a known-good backup.
Action What happens
Quarantine Defender isolates the detected item and keeps it available for review.
Restore Defender returns the quarantined item to the PC. A new detection can appear.
Remove Defender deletes the quarantined copy.
Allow on device Defender permits the detected item. Reserve this for a verified false positive.

If you allowed the wrong item, go to Virus & threat protection > Allowed threats, select the item and choose Don’t allow. For a possible false positive, you or the publisher can ask Microsoft to review a file that you have permission to share.

If the alert came from a memory stick you trust, you can scan that USB drive with Defender before opening any other files on it.

Find the quarantine folder or list items without restoring them

On a typical Windows installation, the quarantine folder is C:\ProgramData\Microsoft\Windows Defender\Quarantine. The equivalent path uses %ProgramData% in place of C:\ProgramData. Use Protection history to see the names and original paths. The files inside the folder are stored in a protected quarantine format. Use Defender’s controls to manage them.

Microsoft says Protection history displays events for two weeks. The quarantine copy has its own retention settings. If an older card has disappeared, you can check what Defender still holds without bringing any file back.

  1. Open Command Prompt as administrator.
  2. Follow Microsoft’s instructions for finding the latest MpCmdRun folder. It is normally in a version folder under %ProgramData%\Microsoft\Windows Defender\Platform.
  3. From that folder, run the list command below. The -ListAll option only lists quarantined items.
MpCmdRun.exe -Restore -ListAll

If the list runs successfully and your file is missing, check whether it was removed or cleaned up, or whether another security product quarantined it. A backup or a fresh copy from the original publisher may be the next step.

Check how long Defender keeps quarantined items

To see Defender’s reported quarantine cleanup setting on a PC you administer, open PowerShell as administrator and run:

Get-MpPreference | Select-Object QuarantinePurgeItemsAfterDelay

The value is in days. Microsoft documents 0 as keeping items indefinitely under this setting. Manual removal and other security actions can still affect whether an item is available.

Administrators who manage retention through Group Policy can find Configure removal of items from Quarantine folder under Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > Quarantine. Open the policy, choose Enabled, enter the number of days to keep items and apply the setting. The day count applies to quarantine cleanup across the device. For a work or school device, check with IT about the policy applied to it. See Microsoft’s remediation policy guide.

Track quarantine jobs in Microsoft Defender for Endpoint

Use the Microsoft Defender Action center for your organization’s managed devices. The Windows Security app shows detections on the individual PC.

  1. Sign in to the Microsoft Defender portal. Under Actions and submissions, open Action center.
  2. Use Pending to review actions awaiting approval. Use History to find the quarantine action and open its details.
  3. For a Stop and quarantine file job, check how many devices succeeded, failed or are still pending. For a specific device, check its timeline. A device that is offline can leave its action pending.

Authorized security staff can start Stop and quarantine file from an eligible file’s page. If the team verifies a file is clean, an eligible quarantine action in History may offer Undo to authorized staff. See Microsoft’s file response actions and Action center instructions.

Frequently asked questions

Where is quarantine in Windows Defender?

Open Windows Security > Virus & threat protection > Protection history. Use the Quarantined items filter to narrow the list.

Can I view quarantined files without restoring them?

Yes. Expand the Protection history card to see the detection details. The administrator command MpCmdRun.exe -Restore -ListAll also lists items currently in quarantine.

Where does a restored file go?

It normally returns to its original path. Check Affected items for the path and review any new detection in Protection history.

Can I restore a file after choosing Remove?

Remove deletes the quarantine copy. Look for a known-good backup or download a fresh copy from the genuine publisher.

Does quarantine automatically empty after two weeks?

Two weeks is the display period for Protection history. Quarantined files follow the device’s separate cleanup policy and can also be removed manually.

Can I quarantine a file myself?

If Defender detects a file and asks what to do, choose Quarantine on its card. On managed devices, authorized security staff can use Stop and quarantine file in Defender for Endpoint.

Where can I see a Defender for Endpoint quarantine job?

Open the Microsoft Defender portal’s Action center. Check History for the job and its results, or Pending for an action waiting for approval.