Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Am looking for a powershell script that cleans (removes) all the items from the most-recently used programs from the Vista/Windows 7 Start menu.

NOTE: Cleaning the items does not mean disabling the MRU behavior - I still want it keep the MRU behavior on; just clean the immediate list of any entries.

share|improve this question

I'd guess you just need to clean the folder %userprofile%\AppData\Roaming\Microsoft\Windows\Recent (this is for Windows Vista)

As for a script to do that, you could use a regular old command shell (.cmd)

del /F %USERPROFILE%\AppData\Roaming\Mircosoft\Windows\Recent\*.lnk
share|improve this answer
The PowerShell equivalent (literal translation, and correcting typo in path) is: Remove-Item -Force "${env:USERPROFILE}\AppData\Roaming\Microsoft\Windows\Recent*.lnk" – alastairs May 28 '09 at 20:34

I can't add a comment to the existing answer, but there is an environment variable for the AppData path that you should probably use instead, so:

del /F %APPDATA%\Microsoft\Windows\Recent*.lnk

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.