Trace Id is missing

Unlock your potential with Microsoft Copilot

Get things done faster and unleash your creativity with the power of AI anywhere you go.
Microsoft Copilot app being utilized to generate pictures of a singing dog, assisting to identify a flower, and helping to generate an email to congratulate a coworker on a promotion.

Reset Windows Search

Use this script to reset Windows Search

Important! Selecting a language below will dynamically change the complete page content to that language.

Download
  • Version:

    1.1

    Date Published:

    9/13/2019

    File Name:

    ResetWindowsSearchBox.ps1

    File Size:

    3.8 KB

    KB Articles:

    4520146

    Fix problems with Windows Search by running the ResetWindowsSearchBox.ps1 PowerShell script. You must have Administrator permissions to run this script.
  • Supported Operating Systems

    Windows 10

    Windows 10 May 2019 Update
  • If the Windows 10 May 2019 Update or a later update is installed, use Windows PowerShell to reset Windows Search. To do this, follow these steps.

    Note You must have administrator permissions to run this script.
    1. Click the Download button and save ResetWindowsSearchBox.ps1 to a local folder.
    2. Right-click the file that you saved, and select Run with PowerShell.
    3. If you are asked "Do you want to allow this app to make changes to your device?," select Yes.
    4. The PowerShell script resets the Windows Search feature. When the word "Done" appears, close the PowerShell window.
    5. If you receive a "Cannot be loaded because running scripts is disabled on this system" error message, enter the following command on the command line of the PowerShell window, and then press Enter:

      Get-ExecutionPolicy

      Note The current policy appears in the window. For example, you might see Restricted. We recommend that you note this value because you'll have to use it later.
    6. Enter the following command on the command line of the PowerShell window, and then press Enter:

      Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

      Note You'll receive a warning message that explains the security risks of an execution policy change. Press Y, and then press Enter to accept the change.

      To learn more about PowerShell execution policies, see About Execution Policies.
    7. After the policy change is completed, close the window, and then repeat steps 2–4. However, when the "Done" message appears this time, DON'T close the PowerShell window. Instead, press any key to continue.
    8. Revert to your previous PowerShell execution policy setting. To do this, enter the following command on the command line of the PowerShell window, press the Spacebar, enter the policy value that you noted in step 5, and then press Enter:

      Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy

      For example, if the policy that you noted in step 5 was Restricted, the command would resemble the following:

      Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Restricted

      Note You'll receive a warning message that explains the security risks of an execution policy change. Press Y, and then press Enter to accept the change and revert to your previous policy setting.
    9. Close the PowerShell window.
    Note If your organization has disabled the ability to run scripts, contact your administrator for help.
Follow Microsoft