Reset Windows: Spotlight Windows 11 [work]
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
foreach ($regPath in $registryPaths.Keys) if (Test-Path $regPath) foreach ($property in $registryPaths[$regPath]) if ($property -like " - ") Where-Object $ .PSChildName -like $property else Remove-ItemProperty -Path $regPath -Name $property -ErrorAction SilentlyContinue
echo. echo Done! Please restart your computer. timeout /t 5 /nobreak >nul exit Save as Advanced-Reset-WindowsSpotlight.ps1 : reset windows spotlight windows 11
# Reset Windows Spotlight on Windows 11 # Run as Administrator Write-Host "Resetting Windows Spotlight..." -ForegroundColor Cyan Stop-Service -Name WpnService, LicenseManager -Force -ErrorAction SilentlyContinue 1. Clear Spotlight cache files $spotlightPaths = @( "$env:LOCALAPPDATA\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets", "$env:LOCALAPPDATA\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\Settings", "$env:USERPROFILE\AppData\Local\Microsoft\Windows\Spotlight" )
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 Reset registry echo Resetting registry settings
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" )
foreach ($regPath in $regPaths) if (Test-Path $regPath) Remove-ItemProperty -Path $regPath -Name "RotatingLockScreen*" -ErrorAction SilentlyContinue Remove-ItemProperty -Path $regPath -Name "SubscribedContent-*" -ErrorAction SilentlyContinue Please restart your computer
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
