In Defender's Protection History, when I click on "Restore" or "Remove" for one threat, I get a UAC prompt, then nothing happens when I confirm. After accepting once, I don't get other UAC prompts, but further commands don't do anything either.
I had the same issue: it was due to the fact that the file that Windows Defender quarantined was originally in a folder that I had later renamed. This caused restore to fail silently, since Defender didn't know where to restore the file (what a great program). There is no way to specific another folder where to restore the file in the UI: one has to use the CLI.
To fix the issue, open cmd.exe as admin and run:
"%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Restore -name "filename" -Path C:\temp\restoredfiles
where:
filename: filename of the file to be restored.
C:\temp\restoredfiles: folder where the file should be restored.
And if all the quarantined files were false positive, one can restore all files at once as follows:
"%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Restore -All -Path C:\temp\restoredfiles
The commands come from DrMoishe Pippik's great answer.
As a side note, if one tries to restore the deleted file via CLI without specifying the path (e.g., with "%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Restore -name "filename") and if the original folder was later renamed, one gets the error message:
Error code: 0x80508014 Cannot restore a file
To open cmd.exe as admin:
