PoshTip #51 – Clear Windows Run History

Windows stores the commands that you have executed from the Run window in the registry. It means that you can easily clear this history.

Click on the drop down list in Run window:

Open the Registry Editorand navigate to the following path:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU

You can change the MRUList value to create your own history order. You also can create an entry directly from the registry but remember to add the “\1” at the end of the value.

Now you can easily clear the history using PowerShell:

PS > cd HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\
PS HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\> Remove-Item .\RunMRU\

 

 

Thanks for reading! You can follow me on Twitter @PrigentNico

 

About Nicolas 282 Articles
I work as an IT Production Manager, based in Paris (France) with a primary focus on Microsoft technologies. I have 10 years experience in administering Windows Servers. . I am a Microsoft MVP for Cloud & Datacenter Management. I also received the PowerShell Hero 2016 award by PowerShell.0rg. And finally, I am "MCSE: Cloud Platform and Infrastructure", "MCSA: Windows Servers", "Administering & Deploying SCCM", and CheckPoint CCSA certified.