Skip to content

Instantly share code, notes, and snippets.

@tylerapplebaum
Last active April 5, 2024 18:05
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tylerapplebaum/de9ea8d65c519ff52f149106672e6c52 to your computer and use it in GitHub Desktop.
Save tylerapplebaum/de9ea8d65c519ff52f149106672e6c52 to your computer and use it in GitHub Desktop.
Remove recent files and jump list entries on Windows 10
Function Clear-RecentItems {
$Namespace = "shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}"
$QuickAccess = New-Object -ComObject shell.application
$RecentFiles = $QuickAccess.Namespace($Namespace).Items()
$RecentFiles | % {$_.InvokeVerb("remove")}
Remove-Item -Force "${env:USERPROFILE}\AppData\Roaming\Microsoft\Windows\Recent\*.lnk"
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "Start_TrackDocs" -Value 0 -PropertyType DWORD
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "Start_TrackDocs"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment