Reset Windows Search PowerShell script

1.1

A solution provided by Microsoft for those who are experiencing problems with the Windows Search, whether it is unresponsive or the results are not as expected

The system-wide desktop search feature in Windows enables you to look for applications, files, folders or any other items located on your computer, either via the Start menu or the “Search” field in Windows Explorer.
But like any other technology-related tools, it might sometimes happen that Windows Search becomes unresponsive or that it does not display the search results as you would expect. In this case, it is recommended that you check for available system updates or run the Search and Indexing Troubleshooter. You could also try restarting the Windows Search process (SearchUI.exe) via the Task Manager.
However, a more direct alternative to getting the Windows Search fixed is to run the Reset Windows Search PowerShell script, provided by Microsoft itself. Please take into account that this script only works on Windows 10, version 1903 and later.

Reset Windows Search with a simple script 


Resetting the Windows Search can also be done manually, but using a ready-made Powershell script is faster and more convenient. To do so, you must download the PS1 file to your computer, right-click on it and select “Run with Powershell”. Keep in mind that administrator rights are mandatory.
More often than not, computers are configured by default to block the execution of scripts, so you might get an error stating that the script cannot be loaded because running scripts is disabled on your system.
While Microsoft gives instructions to modify the execution policy and then revert the changes once you run the Reset Windows Search PowerShell script, a faster method is to simply bypass the policy for the “ResetWindowsSearchBox.ps1” script only. To do so, you must ether the following command in Powershell: “powershell -ExecutionPolicy Bypass –File ResetWindowsSearchBox.ps1”.

Run a script to fix Windows Search 


Executing this script resets the Windows Search box in the attempt to repair the problems that might occur. This operation does not affect your files, but it might temporarily affect the relevance of the displayed results. Nevertheless, it is a Microsoft-signed solution that you can try out to make sure your computer’s search functionality works as it should.