Forum Discussion
How to recover files deleted by windows defender on USB flash drive?
- Mar 17, 2025
If you can't find the deleted files from Trash, then use a data recovery software to help yo retrieve the files deleted by Windows Defender. The sooner you do this, the higher chance to get back the files.
Here is a very helpful tutorial for data recovery:
https://www.pctipdaily.com/recover-files-deleted-by-windows-defender
It applies to internal drive, external drive, USB drive and SD card!
If you prefer to use the command line to recover files deleted by Windows Defender, here are a few command line methods:
Recover files from Windows Defender quarantine using PowerShell
If a file was quarantined by Windows Defender instead of being completely deleted, you can try to recover it using PowerShell. Open PowerShell (Run as Administrator) and use the following command to view quarantined files:
sql
Get-MpThreatDetection
Once you have found the file you want to recover, you can use the following command to recover the file:
arduino
Restore-MpThreat -ThreatID "threat_ID"
Note that you will need the threat_ID, which you can find using Get-MpThreatDetection.
Use command line data recovery tools
If the file has been deleted and is not in quarantine, you can try command line data recovery tools. For example, use the chkdsk command to check if a USB drive has any recoverable lost files:
Open Command Prompt (Run as Administrator) and enter:
bash
chkdsk X: /f
Where X: is the letter of your USB drive. This command will scan the drive and attempt to repair any corrupted file systems. It may not recover all your files, but it's worth a try.
Use Windows' built-in backup and restore commands
If you previously turned on file history or backups, you can restore files from the command line. You can use the wbadmin command in the command line to restore a previous backup:
php-template
wbadmin start recovery -version:<version number> -itemType:File -items:<file path> -backupTarget:<backup storage location>
Where <version number> is the backup version you want to restore, <file path> is the file path you want to restore, and <backup storage location> is the backup storage location.
These command line methods are suitable for different recovery situations. See which one works for you and try to recover your files that were deleted by Windows Defender!