We have a customer whose Microsoft Edge browser on their compuer was taken over by a malware / tech support scam. It told them that their entire computer was unsafe.
First step is of course to scan the computer with Antivirus and Anti-Malware tools. We recommend ESET Anti-Virus and Malware Bytes software. A commercial version with an active subscription is very important to protect yourself from viruses like this.
In this case, the cause was not found and so we needed to do a manual reset of Microsoft Edge. Because Microsoft Edge is pre-installed, there are no options to re-install it. The problem we were trying to solve show up as soon as we opened Microsoft Edge and so we coulnd't access the Microsoft Edge settings to clear them.
Here is how to clear and reinstall Microsoft Edge Browser
First use your File Explorer to go to this path on your computer. Notice the %username%. This should actually be your currently logged on user. If you don't know what that is, simply type "whoami" at the command prompt.
C:\Users\%username%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe
Make sure the Microsoft Edge browser is closed and then delete all the folders and files in here. This will delete all of your Microsoft Edge user files, password cache, temporary cache, etc.
The next step is to reinstall Microsoft Edge to recreate these settings. To do this, open your start button and start typing "powershell". When it finds the Powershell program, right click on it and choose "Run as Administrator". This will open up another command prompt window. Then paste the following line in the prompt.
Get-AppXPackage -AllUsers -Name Microsoft.MicrosoftEdge | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml” -Verbose}
This will set everything back to factory with the Microsoft Edge browser, clearing all those nasty malware pop ups in Microsoft Edge.