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.

link|improve this question

50% accept rate
feedback

2 Answers

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
link|improve this answer
3  
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
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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