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
function Backup-Registry $backupPath = "$env:TEMP\Spotlight_Backup_$(Get-Date -Format 'yyyyMMdd_HHmmss').reg" Write-Log "Creating registry backup: $backupPath" -Color Yellow reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" "$backupPath" /y >$null reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Lock Screen" "$backupPath.append" /y >$null return $backupPath Write-Log "=== Windows Spotlight Reset Utility for Windows 11 ===" -Color Cyan Write-Log "Starting reset process..." -Color Cyan
Windows Registry Editor Version 5.00 ; Reset Windows Spotlight Settings [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\RotatingLockScreen] [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\LockScreen\Spotlight] reset windows spotlight windows 11
Read-Host "`nPress Enter to exit" Save as ResetSpotlight.reg :
Write-Log "=== Reset Complete! ===" -Color Green Write-Log "Next steps:" -Color Cyan Write-Log "1. Restart your computer (recommended)" -Color White Write-Log "2. Go to: Settings > Personalization > Lock screen" -Color White Write-Log "3. Set 'Personalize your lock screen' to 'Windows Spotlight'" -Color White Write-Log "" Write-Log "Backup saved at: $backupFile (if not skipped)" -Color Gray REM Clear Spotlight cache echo Clearing cache files
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
Write-Host "`nWindows Spotlight has been reset!" -ForegroundColor Green Write-Host "Please sign out and sign back in, or restart your computer." -ForegroundColor Cyan Write-Host "Then go to Settings > Personalization > Lock screen and select 'Windows Spotlight' again." -ForegroundColor Cyan Clear thumbnail cache Write-Host "Clearing thumbnail cache
REM Reset registry echo Resetting registry settings... reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Lock Screen" /v RotatingLockScreenEnabled /f >nul 2>&1 reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v RotatingLockScreenEnabled /f >nul 2>&1