function Write-Log param([string]$Message, [string]$Color = "White") Write-Host "[$(Get-Date -Format 'HH:mm:ss')] $Message" -ForegroundColor $Color

Read-Host "`nPress Enter to exit" Save as ResetSpotlight.reg :

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

<# .SYNOPSIS Complete reset of Windows Spotlight feature on Windows 11 .DESCRIPTION Clears cache, resets registry, repairs system files, and re-registers Spotlight components .NOTES Requires Administrator privileges #> #Requires -RunAsAdministrator

Read-Host "`nPress Enter to exit"

# 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.

param( [switch]$Force, [switch]$SkipBackup )

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

Close