Mountain Project Logo

Windows 11 | Reset Windows Spotlight

foreach ($dir in $directories) if (Test-Path $dir) Remove-Item "$dir*" -Recurse -Force -ErrorAction SilentlyContinue Write-Log " Cleared: $dir" -Color Gray else Out-Null

REM Clear Spotlight cache echo Clearing cache files... del /q "%LOCALAPPDATA%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets*" >nul 2>&1 del /q "%LOCALAPPDATA%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\Settings*" >nul 2>&1 del /q "%USERPROFILE%\AppData\Local\Microsoft\Windows\Spotlight*" >nul 2>&1

REM Restart services net start WpnService >nul 2>&1 net start LicenseManager >nul 2>&1 reset windows spotlight windows 11

# Run these additional commands in PowerShell as Admin DISM /Online /Cleanup-Image /RestoreHealth sfc /scannow Get-AppxPackage -AllUsers | Where-Object $_.Name -like "*ContentDeliveryManager*" | Reset-AppxPackage The PowerShell scripts provide the most thorough reset with error handling and backup capabilities. The batch file is quickest for basic reset needs.

if (-not $SkipBackup) $backupFile = Backup-Registry Write-Log "Stopping Windows services..." -Color Yellow $services = @("WpnService", "LicenseManager", "wlidsvc") foreach ($service in $services) Stop-Service -Name $service -Force -ErrorAction SilentlyContinue Write-Log " Stopped: $service" -Color Gray 2. Kill and clear Windows Spotlight processes Write-Log "Clearing system cache..." -Color Yellow Get-Process -Name "SystemSettings*", "ShellExperienceHost*", "SearchApp*" -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue 3. Clear all Spotlight related directories $directories = @( "$env:LOCALAPPDATA\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets", "$env:LOCALAPPDATA\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\Settings", "$env:USERPROFILE\AppData\Local\Microsoft\Windows\Spotlight", "$env:USERPROFILE\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\AC\Microsoft\CLR_v4.0\UsageLogs" ) Clear thumbnail cache Write-Host "Clearing thumbnail cache

REM Re-enable Spotlight reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v RotatingLockScreenEnabled /t REG_DWORD /d 1 /f >nul 2>&1

Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Lock Screen" ` -Name "RotatingLockScreenEnabled" -Value 1 -Type DWord -Force if (Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization") Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" ` -Name "NoLockScreen" -ErrorAction SilentlyContinue 5. Clear thumbnail cache Write-Host "Clearing thumbnail cache..." -ForegroundColor Yellow Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\thumbcache_*.db" -Force -ErrorAction SilentlyContinue Restart services Start-Service -Name WpnService, LicenseManager -ErrorAction SilentlyContinue 6. Restart Windows Explorer Stop-Process -Name explorer -Force -ErrorAction SilentlyContinue &1 net start LicenseManager &gt

foreach ($regPath in $registryPaths.Keys) if (Test-Path $regPath) foreach ($property in $registryPaths[$regPath]) if ($property -like " - ") Get-ItemProperty -Path $regPath else Remove-ItemProperty -Path $regPath -Name $property -ErrorAction SilentlyContinue

Welcome

Join the Community! It's FREE

Already have an account? Login to close this notice.