Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
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
add comment

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
add comment

Your Answer

 
discard

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.