Ultimate Guide to Fix Spotlight Desktop and Lock Screen


DuguaySarah94

Member
Local time
3:53 PM
Posts
7
OS
Windows 11
Windows 11 25H2 Spotlight Repair Guide
Lock Screen & Desktop Spotlight
1. Purpose

This document provides a structured procedure to resolve issues with Windows Spotlight on Windows 11 25H2, including both:
  • Lock Screen Spotlight
  • Desktop Spotlight
Common symptoms addressed include:
  • Spotlight images not updating
  • Lock screen stuck on a static image
  • Desktop Spotlight not rotating
  • Black or blank backgrounds
2. Scope
This guide applies to:
  • Windows 11 version 25H2
  • Local administrator environments
  • Systems where Spotlight is enabled but not functioning correctly
⚠️ This guide does not apply to devices where Spotlight is disabled via Group Policy, Intune, or enterprise configuration.
3. Prerequisites
Before proceeding, ensure:
  • You are signed in with Administrator privileges
  • PowerShell is launched using: Run as Administrator
  • The device has internet connectivity


4. Process Overview
The remediation process consists of three procedures:

Procedure

Description

Part 1

Reset Lock Screen Spotlight

Part 2

Reset Desktop Spotlight (25H2)

Part 3

Force Content Refresh (Time Adjustment Method)

5. Part 1 – Lock Screen Spotlight Repair
Step One – Disable Lock Screen Spotlight

Navigate to:
Settings → Personalization → Lock Screen
Change:
Windows Spotlight → Picture
Step Two – Run Lock Screen Script
Run your Lock Screen Spotlight PowerShell script in an elevated session.

Code:
# Fix-SpotlightInteractive.ps1
# Interactive Spotlight dependency fixer + debugger for Windows 11
# - Asks before each change (Y/N)
# - Logs everything to Desktop
# - Targets BOTH lock screen Spotlight (ContentDeliveryManager) and desktop Spotlight (Client.CBS / IrisService)
 
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
 
function Test-Admin {
    $id = [Security.Principal.WindowsIdentity]::GetCurrent()
    $p  = New-Object Security.Principal.WindowsPrincipal($id)
    return $p.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
}
 
if (-not (Test-Admin)) {
    Write-Host "ERROR: Run this script in PowerShell as ADMIN." -ForegroundColor Red
    Write-Host "Tip: Start menu -> type PowerShell -> Run as administrator." -ForegroundColor Yellow
    exit 1
}
 
# ---- Logging
$stamp = Get-Date -Format "yyyyMMdd-HHmmss"
$LogPath = Join-Path $env:USERPROFILE "Desktop\SpotlightFix-$stamp.log"
Start-Transcript -Path $LogPath -Append | Out-Null
 
function Say([string]$msg, [ConsoleColor]$color = "Cyan") {
    Write-Host $msg -ForegroundColor $color
}
 
function Confirm-Step {
    param(
        [Parameter(Mandatory)] [string] $Title,
        [Parameter(Mandatory)] [string] $Details,
        [Parameter(Mandatory)] [scriptblock] $Action
    )
    Say ""
    Say "=== $Title ===" "White"
    Say $Details "Gray"
    $resp = Read-Host "Apply this change? (Y)es / (N)o"
    if ($resp -match '^(y|yes)$') {
        try {
            & $Action
            Say "DONE: $Title" "Green"
        } catch {
            Say "FAILED: $Title" "Red"
            Say $_.Exception.Message "Red"
        }
    } else {
        Say "SKIPPED: $Title" "Yellow"
    }
}
 
function Get-RegValue {
    param([string]$Path, [string]$Name)
    try {
        (Get-ItemProperty -Path $Path -ErrorAction Stop).$Name
    } catch { $null }
}
 
function Set-RegDword {
    param([string]$Path, [string]$Name, [int]$Value)
    if (-not (Test-Path $Path)) { New-Item -Path $Path -Force | Out-Null }
    New-ItemProperty -Path $Path -Name $Name -PropertyType DWord -Value $Value -Force | Out-Null
}
 
function Remove-RegValueIfExists {
    param([string]$Path, [string]$Name)
    if (Test-Path $Path) {
        $cur = Get-RegValue $Path $Name
        if ($null -ne $cur) {
            Remove-ItemProperty -Path $Path -Name $Name -Force -ErrorAction SilentlyContinue
        }
    }
}
 
function Export-RegKeyIfExists {
    param([string]$RegPath, [string]$OutFile)
    # reg.exe needs HKLM\... format
    $exists = $false
    try {
        $null = reg.exe query $RegPath 2>$null
        $exists = ($LASTEXITCODE -eq 0)
    } catch {}
    if ($exists) {
        reg.exe export $RegPath $OutFile /y | Out-Null
        return $true
    }
    return $false
}
 
function Ensure-Service {
    param(
        [string]$Name,
        [ValidateSet("Automatic","Manual","Disabled")] [string]$Startup = "Automatic"
    )
    $svc = Get-Service -Name $Name -ErrorAction SilentlyContinue
    if (-not $svc) { return "MISSING" }
    try {
        Set-Service -Name $Name -StartupType $Startup -ErrorAction SilentlyContinue
    } catch {}
    try {
        if ($svc.Status -ne "Running") { Start-Service -Name $Name -ErrorAction SilentlyContinue }
    } catch {}
    $svc = Get-Service -Name $Name -ErrorAction SilentlyContinue
    return $svc.Status.ToString()
}
 
function Safe-DeleteFolder {
    param([string]$Path)
    if (Test-Path $Path) {
        Remove-Item -Path $Path -Recurse -Force -ErrorAction SilentlyContinue
    }
}
 
function Ensure-Folder {
    param([string]$Path)
    if (-not (Test-Path $Path)) { New-Item -ItemType Directory -Path $Path -Force | Out-Null }
}
 
function Run-CDMTasks {
    $taskPath = "\Microsoft\Windows\Shell\ContentDeliveryManager\"
    $tasks = Get-ScheduledTask -TaskPath $taskPath -ErrorAction SilentlyContinue
    if (-not $tasks) {
        Say "No scheduled tasks found under $taskPath (could be removed/blocked)." "Yellow"
        return
    }
    foreach ($t in $tasks) {
        try {
            Enable-ScheduledTask -TaskName $t.TaskName -TaskPath $taskPath -ErrorAction SilentlyContinue | Out-Null
        } catch {}
        try {
            Start-ScheduledTask -TaskName $t.TaskName -TaskPath $taskPath -ErrorAction SilentlyContinue
            Say "Started task: $($t.TaskName)" "Green"
        } catch {
            Say "Could not start task: $($t.TaskName) :: $($_.Exception.Message)" "Yellow"
        }
    }
}
 
# ---- Snapshot (no prompts)
Say "Spotlight Debug/Fix - START" "White"
 
$os = Get-ComputerInfo
Say "OS: $($os.WindowsProductName)  Build: $($os.OsBuildNumber)  Version: $($os.WindowsVersion)" "Gray"
Say "Log file: $LogPath" "Gray"
 
# Metered connection quick check (best effort)
try {
    $profiles = Get-NetConnectionProfile -ErrorAction SilentlyContinue
    foreach ($p in $profiles) {
        Say "Network '$($p.Name)': IPv4Connectivity=$($p.IPv4Connectivity)  NetworkCategory=$($p.NetworkCategory)  IsMetered=$($p.IsMetered)" "Gray"
    }
} catch {}
 
# ---- Step 1: Remove "background apps globally disabled" toggles (common reset prerequisite)
Confirm-Step -Title "Enable Background Apps (remove global disable flags)" -Details @"
This removes two registry values that globally disable background execution:
- HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\GlobalUserDisabled
- HKCU\Software\Microsoft\Windows\CurrentVersion\Search\BackgroundAppGlobalToggle
Spotlight depends on background activity.
"@ -Action {
    Remove-RegValueIfExists "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" "GlobalUserDisabled"
    Remove-RegValueIfExists "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" "BackgroundAppGlobalToggle"
}
 
# ---- Step 2: Ensure notifications/toasts enabled (Spotlight + content delivery often relies on notification infrastructure)
Confirm-Step -Title "Enable Toast Notifications (HKCU PushNotifications)" -Details @"
Turns on toast notifications:
HKCU\Software\Microsoft\Windows\CurrentVersion\PushNotifications\ToastEnabled = 1
If toasts are disabled system-wide, Spotlight often behaves 'dead' (no refresh).
"@ -Action {
    Set-RegDword "HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications" "ToastEnabled" 1
}
 
# ---- Step 3: Advertising ID + Tailored experiences (OPTIONAL but commonly tied to Spotlight/IRIS targeting)
$adIdCur = Get-RegValue "HKCU:\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" "Enabled"
$tailCur = Get-RegValue "HKCU:\Software\Microsoft\Windows\CurrentVersion\Privacy" "TailoredExperiencesWithDiagnosticDataEnabled"
Confirm-Step -Title "Enable Advertising ID + Tailored Experiences (optional, may be required for consistent Spotlight)" -Details @"
Current values:
- Advertising ID: HKCU\...\AdvertisingInfo\Enabled = $adIdCur
- Tailored:       HKCU\...\Privacy\TailoredExperiencesWithDiagnosticDataEnabled = $tailCur
 
If you've disabled these for privacy, Spotlight/IRIS targeting can stop refreshing.
This step sets both to 1.
"@ -Action {
    Set-RegDword "HKCU:\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" "Enabled" 1
    Set-RegDword "HKCU:\Software\Microsoft\Windows\CurrentVersion\Privacy" "TailoredExperiencesWithDiagnosticDataEnabled" 1
}
 
# ---- Step 4: ContentDeliveryManager baseline ON (this is the core feature gate area)
$cdm = "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
$keysToEnable = @(
    "ContentDeliveryAllowed",
    "FeatureManagementEnabled",
    "OemPreInstalledAppsEnabled",
    "PreInstalledAppsEnabled",
    "SilentInstalledAppsEnabled",
    "SoftLandingEnabled",
    "SubscribedContentEnabled",
    "SystemPaneSuggestionsEnabled",
    # Common SubscribedContent toggles observed in community scripts (IDs vary but these are common):
    "SubscribedContent-338388Enabled",
    "SubscribedContent-338389Enabled"
)
 
$preview = $keysToEnable | ForEach-Object {
    $v = Get-RegValue $cdm $_
    " - $($_) = $v"
} | Out-String
 
Confirm-Step -Title "Enable ContentDeliveryManager gates (core Spotlight switches)" -Details @"
These registry values frequently get set to 0 by 'debloat' tools and privacy tweaks.
They live at:
HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager
 
Current snapshot:
$preview
 
This step sets the above values to 1 (enabled).
NOTE: This can also re-enable 'suggested content' style behaviors.
"@ -Action {
    foreach ($k in $keysToEnable) { Set-RegDword $cdm $k 1 }
}
 
# ---- Step 5: Detect & optionally remove Policy blocks (these override your personal toggles)
$policyKeys = @(
    "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent",
    "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors"
)
 
foreach ($pk in $policyKeys) {
    $exists = $false
    try {
        $null = reg.exe query $pk 2>$null
        $exists = ($LASTEXITCODE -eq 0)
    } catch {}
    if ($exists) {
        $backup = Join-Path $env:USERPROFILE "Desktop\PolicyBackup-$($pk.Split('\')[-1])-$stamp.reg"
        Confirm-Step -Title "Policy key present: $pk (may be blocking Spotlight)" -Details @"
This policy path exists and can override your Settings UI.
Policy backup file will be exported to:
$backup
 
If you choose YES, the script will:
1) Export the key
2) REMOVE common Spotlight/location disable values under it (not delete the whole key unless empty)
"@ -Action {
            $did = Export-RegKeyIfExists $pk $backup
            Say "Exported policy backup: $did" "Gray"
            # Remove common blocking values (best effort). If absent, no harm.
            try {
                if ($pk -like "*CloudContent") {
                    $path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent"
                    Remove-RegValueIfExists $path "DisableWindowsSpotlightFeatures"
                    Remove-RegValueIfExists $path "DisableWindowsConsumerFeatures"
                    Remove-RegValueIfExists $path "DisableSpotlightOnLockScreen"
                    Remove-RegValueIfExists $path "DisableThirdPartySuggestions"
                }
                if ($pk -like "*LocationAndSensors") {
                    $path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors"
                    Remove-RegValueIfExists $path "DisableLocation"
                    Remove-RegValueIfExists $path "DisableWindowsLocationProvider"
                }
            } catch {}
        }
    } else {
        Say "Policy key NOT found: $pk" "Gray"
    }
}
 
# ---- Step 6: Ensure required services (time, background transfer, notifications)
Confirm-Step -Title "Enable/Start core services (Time/BITS/Delivery Optimization/Push)" -Details @"
This sets key services to non-disabled + starts them:
- w32time (Windows Time) -> Automatic
- BITS (Background Intelligent Transfer) -> Automatic
- DoSvc (Delivery Optimization) -> Manual
- WpnService (Windows Push Notifications System Service) -> Automatic
- lfsvc (Geolocation Service) -> Manual
 
These services commonly affect Spotlight fetching & TLS/time trust.
"@ -Action {
    Say "w32time: $(Ensure-Service -Name 'w32time' -Startup Automatic)" "Gray"
    Say "BITS:    $(Ensure-Service -Name 'BITS' -Startup Automatic)" "Gray"
    Say "DoSvc:   $(Ensure-Service -Name 'DoSvc' -Startup Manual)" "Gray"
    Say "WpnService: $(Ensure-Service -Name 'WpnService' -Startup Automatic)" "Gray"
    Say "lfsvc:   $(Ensure-Service -Name 'lfsvc' -Startup Manual)" "Gray"
}
 
# ---- Step 7: Force time resync (best effort)
Confirm-Step -Title "Force Windows Time resync" -Details @"
Runs:
w32tm /resync /force
 
If your clock/timezone/NTP is off, Spotlight's HTTPS fetch can fail silently.
"@ -Action {
    w32tm /resync /force | Out-Host
}
 
# ---- Step 8: Ensure Spotlight cache folders exist (desktop + lock)
$cbsi = Join-Path $env:LOCALAPPDATA "Packages\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\LocalCache\Microsoft\IrisService"
$cdmi = Join-Path $env:LOCALAPPDATA "Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalCache\Microsoft\IrisService"
Confirm-Step -Title "Ensure IrisService folder structure exists (Desktop + Lock pipelines)" -Details @"
Creates (if missing):
- $cbsi
- $cdmi
 
Desktop Spotlight commonly uses the Client.CBS IrisService path.
Lock screen uses ContentDeliveryManager assets/settings and can also cache Iris data.
"@ -Action {
    Ensure-Folder $cbsi
    Ensure-Folder $cdmi
}
 
# ---- Step 9: Reset Spotlight caches (assets/settings/iris)
$assets  = Join-Path $env:LOCALAPPDATA "Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets"
$settings= Join-Path $env:LOCALAPPDATA "Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\Settings"
 
Confirm-Step -Title "Reset Spotlight caches (delete Assets/Settings/IrisService caches)" -Details @"
Deletes these folders (they will be rebuilt):
- $cbsi
- $cdmi
- $assets
- $settings
 
These are the same core cache locations used in common reset guides.
"@ -Action {
    Safe-DeleteFolder $cbsi
    Safe-DeleteFolder $cdmi
    Safe-DeleteFolder $assets
    Safe-DeleteFolder $settings
    # Recreate the iris folders after deletion
    Ensure-Folder $cbsi
    Ensure-Folder $cdmi
}
 
# ---- Step 10: Re-register the two AppX packages (Lock + Desktop)
Confirm-Step -Title "Re-register Spotlight packages (ContentDeliveryManager + Client.CBS)" -Details @"
Re-registers:
- Microsoft.Windows.ContentDeliveryManager (Lock screen pipeline)
- MicrosoftWindows.Client.CBS (Desktop Spotlight pipeline)
 
This is equivalent to reinstalling the app registration for the current user.
"@ -Action {
    $cdmPkg = Get-AppxPackage *ContentDeliveryManager* -ErrorAction SilentlyContinue | Select-Object -First 1
    if ($cdmPkg) {
        Add-AppxPackage -DisableDevelopmentMode -Register (Join-Path $cdmPkg.InstallLocation "AppxManifest.xml") | Out-Null
        Say "Re-registered ContentDeliveryManager from: $($cdmPkg.InstallLocation)" "Gray"
    } else {
        Say "ContentDeliveryManager package not found!" "Yellow"
    }
 
    $cbsPkg = Get-AppxPackage *MicrosoftWindows.Client.CBS* -ErrorAction SilentlyContinue | Select-Object -First 1
    if ($cbsPkg) {
        Add-AppxPackage -DisableDevelopmentMode -Register (Join-Path $cbsPkg.InstallLocation "AppxManifest.xml") | Out-Null
        Say "Re-registered Client.CBS from: $($cbsPkg.InstallLocation)" "Gray"
    } else {
        Say "MicrosoftWindows.Client.CBS package not found!" "Yellow"
    }
}
 
# ---- Step 11: Enable & run ContentDeliveryManager scheduled tasks
Confirm-Step -Title "Enable & run ContentDeliveryManager Scheduled Tasks" -Details @"
Runs tasks under:
\Microsoft\Windows\Shell\ContentDeliveryManager\
 
If these tasks are disabled/removed, Spotlight often stops refreshing entirely.
"@ -Action {
    Run-CDMTasks
}
 
# ---- Step 12: Open the exact Settings pages you must toggle (no guessing)
Confirm-Step -Title "Open Settings pages (Region/Time/Location/Spotlight) for final verification" -Details @"
This will OPEN Settings pages so you can verify:
- Region & language
- Date & time / Time zone / Sync
- Location services
- Background (Desktop Spotlight)
- Lock screen (Lock screen Spotlight)
 
This is the fastest way to confirm whether the remaining breakage is:
- Region/time/location mismatch
- Or still policy/network-blocked
"@ -Action {
    Start-Process "ms-settings:regionlanguage"
    Start-Process "ms-settings:dateandtime"
    Start-Process "ms-settings:privacy-location"
    Start-Process "ms-settings:personalization-background"
    Start-Process "ms-settings:lockscreen"
}
 
Say ""
Say "Spotlight Debug/Fix - COMPLETE" "White"
Say "Log saved at: $LogPath" "Green"
Say ""
Say "NEXT (IMPORTANT):" "White"
Say "1) Set Desktop background to 'Picture', then back to 'Windows Spotlight'." "Gray"
Say "2) Set Lock screen to 'Picture', then back to 'Windows Spotlight'." "Gray"
Say "3) Ensure NOT on Metered connection and NOT in Battery Saver while testing." "Gray"
 
Stop-Transcript | Out-Null

Step Three – Restart the System
Restart the device to apply changes.
Step Four – Re-enable Lock Screen Spotlight
Return to:
Settings → Personalization → Lock Screen
Set:
Windows Spotlight
6. Part 2 – Desktop Spotlight Repair (Windows 11 25H2)
Step One – Disable Desktop Spotlight

Navigate to:
Settings → Personalization → Background
Change:
Windows Spotlight → Picture
Step Two – Run Desktop Script
Run your Desktop Spotlight PowerShell script in an elevated session.
Step Three – Restart the System
Restart the device.
Step Four – Re-enable Desktop Spotlight
Navigate to:
Settings → Personalization → Background
Set:
Windows Spotlight
7. Part 3 – Force Content Refresh (Time Adjustment Method)
7.1 Purpose

In some scenarios, Windows Spotlight does not download new image batches.
This procedure forces Windows to request new Spotlight content from Microsoft services by advancing the system date.
7.2 When to Use
Use this method if:
  • Spotlight remains static after script execution
  • No new images appear
  • Cache folders remain empty
  • Background does not update after multiple restarts
Step One – Disable Automatic Time Settings
Navigate to:
Settings → Time & Language → Date & Time
Turn OFF:
Set time automatically
Set time zone automatically
Step Two – Advance System Date
  1. Click: Change (under manual date/time)
  2. Adjust the system date: +14 days ahead (two weeks)
Step Three – Trigger Spotlight Refresh
After advancing the date:
  • Lock and unlock the device multiple times
  • Leave system idle briefly
  • Ensure internet connection is active
This allows Windows to attempt downloading new Spotlight content.
Step Four – Run Spotlight Script
Execute your Spotlight reset script.
Step Five – Restore System Date
After confirming content refresh:
Option A – Manual
Return to:
Settings → Time & Language → Date & Time
Restore the correct date.
Option B – Scripted
Run your date correction script to automatically:
  • Restore correct system time
  • Re-enable synchronization
Code:
# ===== HKCU Timestamp Refresher (Fixed + Counts) =====
$ErrorActionPreference = "Continue"   # show real errors during debugging (we still catch/skip)
$Apply = $false                      # dry-run by default; set $true to write changes
 
$today = (Get-Date).Date
 
# Patterns to detect:
# 1) ISO-ish prefix: 2028-05-14T
$reIso = [regex]'\b(?<y>20\d{2})-(?<m>\d{2})-(?<d>\d{2})T'
# 2) US display: 05-14-2028 (optional T)
$reUs  = [regex]'\b(?<m>\d{2})-(?<d>\d{2})-(?<y>20\d{2})(?<t>T?)'
 
# Counters
$KeysVisited   = 0
$ValuesScanned = 0
$ValuesChanged = 0
$FixCount      = 0
$ReadErrors    = 0
$WriteErrors   = 0
 
function Fix-String([string]$s, [ref]$fixedHere) {
    if ([string]::IsNullOrEmpty($s)) { return $s }
 
    $result = $s
 
    # --- Fix ISO-ish occurrences (YYYY-MM-DDT) ---
    $result = $reIso.Replace($result, {
        param($m)
 
        $dateText = "{0}-{1}-{2}" -f $m.Groups["y"].Value, $m.Groups["m"].Value, $m.Groups["d"].Value
        $dt = $null
        try {
            $dt = [datetime]::ParseExact($dateText, "yyyy-MM-dd", $null)  # correct ParseExact usage [1](https://ss64.com/ps/syntax-parseexact.html)
        } catch {
            return $m.Value
        }
 
        if ($dt.Date -gt $today) {
            $fixedHere.Value++
            # Preserve the 'T' and anything after it by only replacing the date+T prefix
            return (Get-Date -Format "yyyy-MM-dd") + "T"
        }
 
        return $m.Value
    })
 
    # --- Fix US occurrences (MM-DD-YYYY or MM-DD-YYYYT) ---
    $result = $reUs.Replace($result, {
        param($m)
 
        $dateText = "{0}-{1}-{2}" -f $m.Groups["m"].Value, $m.Groups["d"].Value, $m.Groups["y"].Value
        $dt = $null
        try {
            $dt = [datetime]::ParseExact($dateText, "MM-dd-yyyy", $null)
        } catch {
            return $m.Value
        }
 
        if ($dt.Date -gt $today) {
            $fixedHere.Value++
            # Keep same style (MM-DD-YYYY) and keep optional 'T' if present
            return (Get-Date -Format "MM-dd-yyyy") + $m.Groups["t"].Value
        }
 
        return $m.Value
    })
 
    return $result
}
 
# Walk HKCU
Get-ChildItem -Path "HKCU:\" -Recurse -Force -ErrorAction SilentlyContinue | ForEach-Object {
    $key = $_
    $KeysVisited++
    $path = $key.PSPath
 
    foreach ($name in $key.Property) {
        $ValuesScanned++
 
        $value = $null
        try { $value = $key.GetValue($name) }
        catch { $ReadErrors++; continue }
 
        # string
        if ($value -is [string]) {
            $fixedHere = 0
            $newValue = Fix-String $value ([ref]$fixedHere)
 
            if ($newValue -ne $value) {
                $FixCount += $fixedHere
                $ValuesChanged++
 
                Write-Host "CHANGE: $path -> $name"
                Write-Host "  OLD: $value"
                Write-Host "  NEW: $newValue`n"
 
                if ($Apply) {
                    try { Set-ItemProperty -Path $path -Name $name -Value $newValue }
                    catch { $WriteErrors++ }
                }
            }
        }
        # multi-string
        elseif ($value -is [string[]]) {
            $fixedHere = 0
            $newArray = @()
            $anyDiff = $false
 
            foreach ($item in $value) {
                $fixedItem = 0
                $newItem = Fix-String $item ([ref]$fixedItem)
                $fixedHere += $fixedItem
                if ($newItem -ne $item) { $anyDiff = $true }
                $newArray += $newItem
            }
 
            if ($anyDiff) {
                $FixCount += $fixedHere
                $ValuesChanged++
 
                Write-Host "CHANGE(MULTI): $path -> $name  (fixed $fixedHere timestamp(s))"
 
                if ($Apply) {
                    try { Set-ItemProperty -Path $path -Name $name -Value $newArray }
                    catch { $WriteErrors++ }
                }
            }
        }
    }
}
 
Write-Host "`n===== SUMMARY ====="
Write-Host ("Mode: " + ($(if ($Apply) { "APPLY (writes enabled)" } else { "DRY RUN (no writes)" })))
Write-Host "KeysVisited:    $KeysVisited"
Write-Host "ValuesScanned:  $ValuesScanned"
Write-Host "ValuesChanged:  $ValuesChanged"
Write-Host "TimestampsFixed (occurrences): $FixCount"
Write-Host "ReadErrorsSkipped:  $ReadErrors"
Write-Host "WriteErrorsSkipped: $WriteErrors"

Step Six – Re-enable Automatic Time
Turn ON:
Set time automatically
Set time zone automatically
8. Validation
Confirm the following:
  • Lock screen images rotate
  • Desktop background updates automatically
  • New images appear after refresh cycles
  • No black or blank screens
  • System date/time is correct
9. Troubleshooting
If issues persist:
Check Policy Restrictions
  • Verify Spotlight is not disabled by:
    • Group Policy
    • Intune
    • Registry enforcement
Verify Background App Permissions
  • Ensure background apps are not globally disabled
Confirm Network Status
  • Internet must be active
  • Disable metered connection if enabled
Run System Repair
sfc /scannow
10. Important Notes
  • Always run scripts as Administrator
  • Follow steps in order
  • Allow time for content to refresh after reset
⚠️ Time Adjustment Warning:
  • Do not perform on domain-controlled systems unless approved
  • Incorrect system time may impact:
    • Authentication
    • Certificates
    • Scheduled tasks
11. Summary
This guide restores Windows Spotlight by:
  1. Resetting Spotlight components
  2. Clearing corrupted caches
  3. Forcing content refresh via time adjustment
  4. Restoring normal system configuration
✅ Quick Tip (Highly Recommended for Word)
After pasting:
  1. Select all text
  2. Apply styles:
    • Headings → Heading 1 / Heading 2
  3. Insert: References → Table of Contents
If you want next, I can: ✅ Turn this into a branded corporate SOP template (cover page + versioning + change log)
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP
    CPU
    I don't know
    Motherboard
    IDK
    Memory
    IDK
    Graphics Card(s)
    Intel
    Sound Card
    ?
    Monitor(s) Displays
    32 inches
    Screen Resolution
    IDK
    Hard Drives
    IDK
    PSU
    IDK
    Case
    HP
    Cooling
    ?
    Keyboard
    Razer
    Mouse
    Razer
    Internet Speed
    Office
    Browser
    Windows 11
    Antivirus
    ?
First I corrected the device region which is the region you setup in oobe the first time you install windows and I set it the same region that I have in settings. You cannot change it in windows settings, you have to edit a registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\DeviceRegion\DeviceRegion

Then I run your script and Spotlight was back after a few minutes. This was driving me crazy!

Country and Device Region must be the same for Spotlight to work. 🤷‍♀️


2026-05-23 18_04_14-Στοιχεία λήψης - Εξερεύνηση αρχείων.webp
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo Yoga 7 Pro
    CPU
    Ultra Core Ultra 9 185H
    Motherboard
    Lenovo
    Memory
    32GB
    Graphics Card(s)
    Intel Arc







ALIENS - tutorials.webp
 

My Computers

System One System Two

  • OS
    Win 11 Home ♦♦♦26200.8655 ♦♦♦♦♦♦♦25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built by Ghot® [May 2020]
    CPU
    AMD Ryzen 7 3700X
    Motherboard
    Asus Pro WS X570-ACE (BIOS 5302)
    Memory
    G.Skill (F4-3200C14D-16GTZKW)
    Graphics Card(s)
    EVGA RTX 2070 (08G-P4-2171-KR)
    Sound Card
    Realtek ALC1220P / ALC S1220A
    Monitor(s) Displays
    Dell U3011 30"
    Screen Resolution
    2560 x 1600
    Hard Drives
    2x Samsung 860 EVO 500GB,
    WD 4TB Black FZBX - SATA III,
    WD 8TB Black FZBX - SATA III,
    DRW-24B1ST CD/DVD Burner
    PSU
    PC Power & Cooling 750W Quad EPS12V
    Case
    Cooler Master ATCS 840 Tower
    Cooling
    CM Hyper 212 EVO (push/pull)
    Keyboard
    Ducky DK9008 Shine II Blue LED
    Mouse
    Logitech Optical M-100
    Internet Speed
    300/300
    Browser
    Firefox (latest)
    Antivirus
    Bitdefender Total Security
    Other Info
    Speakers: Klipsch Pro Media 2.1
  • Operating System
    Windows XP Pro 32bit w/SP3
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built by Ghot® (not in use)
    CPU
    AMD Athlon 64 X2 5000+ (OC'd @ 3.2Ghz)
    Motherboard
    ASUS M2N32-SLI Deluxe Wireless Edition
    Memory
    TWIN2X2048-6400C4DHX (2 x 1GB, DDR2 800)
    Graphics card(s)
    EVGA 256-P2-N758-TR GeForce 8600GT SSC
    Sound Card
    Onboard
    Monitor(s) Displays
    ViewSonic G90FB Black 19" Professional (CRT)
    Screen Resolution
    up to 2048 x 1536
    Hard Drives
    WD 36GB 10,000rpm Raptor SATA
    Seagate 80GB 7200rpm SATA
    Lite-On LTR-52246S CD/RW
    Lite-On LH-18A1P CD/DVD Burner
    PSU
    PC Power & Cooling Silencer 750 Quad EPS12V
    Case
    Generic Beige case, 80mm fans
    Cooling
    ZALMAN 9500A 92mm CPU Cooler
    Keyboard
    Logitech Classic Keybooard 200
    Mouse
    Logitech Optical M-BT96a
    Internet Speed
    300/300
    Browser
    Firefox 3.x ??
    Antivirus
    Symantec (Norton)
    Other Info
    Still assembled, still runs. Haven't turned it on for 15 years?
Where is the tutorials is this that I've mentioned in my post?


It probably isn't.

A lot of things in Windows require that Country and Device Region are set, properly.
Even way back in the day, this was true.
Things like CD/DVD players/burners had to have the correct country and device region, to function properly.

I'd imagine that the more time passes, the more complex this will get.

For example... there are many different Windows "rules" for the US and the EU.
Unfortunately, it's probably just gonna get worse.

Maybe someone who travels a lot, could explain this a bit better.

I have a party to go to... but it's in the same country and device region. :-)




Another example (different subject)...
John Connor.webp
 
Last edited:

My Computers

System One System Two

  • OS
    Win 11 Home ♦♦♦26200.8655 ♦♦♦♦♦♦♦25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built by Ghot® [May 2020]
    CPU
    AMD Ryzen 7 3700X
    Motherboard
    Asus Pro WS X570-ACE (BIOS 5302)
    Memory
    G.Skill (F4-3200C14D-16GTZKW)
    Graphics Card(s)
    EVGA RTX 2070 (08G-P4-2171-KR)
    Sound Card
    Realtek ALC1220P / ALC S1220A
    Monitor(s) Displays
    Dell U3011 30"
    Screen Resolution
    2560 x 1600
    Hard Drives
    2x Samsung 860 EVO 500GB,
    WD 4TB Black FZBX - SATA III,
    WD 8TB Black FZBX - SATA III,
    DRW-24B1ST CD/DVD Burner
    PSU
    PC Power & Cooling 750W Quad EPS12V
    Case
    Cooler Master ATCS 840 Tower
    Cooling
    CM Hyper 212 EVO (push/pull)
    Keyboard
    Ducky DK9008 Shine II Blue LED
    Mouse
    Logitech Optical M-100
    Internet Speed
    300/300
    Browser
    Firefox (latest)
    Antivirus
    Bitdefender Total Security
    Other Info
    Speakers: Klipsch Pro Media 2.1
  • Operating System
    Windows XP Pro 32bit w/SP3
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built by Ghot® (not in use)
    CPU
    AMD Athlon 64 X2 5000+ (OC'd @ 3.2Ghz)
    Motherboard
    ASUS M2N32-SLI Deluxe Wireless Edition
    Memory
    TWIN2X2048-6400C4DHX (2 x 1GB, DDR2 800)
    Graphics card(s)
    EVGA 256-P2-N758-TR GeForce 8600GT SSC
    Sound Card
    Onboard
    Monitor(s) Displays
    ViewSonic G90FB Black 19" Professional (CRT)
    Screen Resolution
    up to 2048 x 1536
    Hard Drives
    WD 36GB 10,000rpm Raptor SATA
    Seagate 80GB 7200rpm SATA
    Lite-On LTR-52246S CD/RW
    Lite-On LH-18A1P CD/DVD Burner
    PSU
    PC Power & Cooling Silencer 750 Quad EPS12V
    Case
    Generic Beige case, 80mm fans
    Cooling
    ZALMAN 9500A 92mm CPU Cooler
    Keyboard
    Logitech Classic Keybooard 200
    Mouse
    Logitech Optical M-BT96a
    Internet Speed
    300/300
    Browser
    Firefox 3.x ??
    Antivirus
    Symantec (Norton)
    Other Info
    Still assembled, still runs. Haven't turned it on for 15 years?
It probably isn't.
Then I don't understand the point of your reply, just quoting every tutorial and a funny picture. Believe me I did my research before posting.

Device region and Country/Region are two different things, and I’ve been using different values for each of them for ages without any issues.

Probably in the latest Windows builds they now have to match for Spotlight to work. Let’s stick to that and update the tutorials.
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo Yoga 7 Pro
    CPU
    Ultra Core Ultra 9 185H
    Motherboard
    Lenovo
    Memory
    32GB
    Graphics Card(s)
    Intel Arc
First I corrected the device region which is the region you set up in OOBE the first time you install Windows and I set it the same region that I have in settings. You cannot change it in windows settings, you have to edit a registry key:



Then I run your script and Spotlight was back after a few minutes. This was driving me crazy!

Country and Device Region must be the same for Spotlight to work. 🤷‍♀️


View attachment 172340
I’m so glad you posted this! Honestly, I just want tools that work. AI or not, who cares? It feels like for some people, it’s less about helping the community and more about protecting their own egos, which gets really toxic. I got a ton of hate unnecessary fragile men over my criticism of WinFolderSet; I had a lot complaints about the UI and functionality… it was clear the amateur developer and his white knights clearly didn't care about being helpful, they were just upset out of spite bc ego.

Anyway, I’ve been struggling to get Spotlight to work consistently and tried every hack on here to no avail. I finally turned to AI and got it working, but thanks to your contribution, it’s running even better now! Thank you so much for your help!
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP
    CPU
    I don't know
    Motherboard
    IDK
    Memory
    IDK
    Graphics Card(s)
    Intel
    Sound Card
    ?
    Monitor(s) Displays
    32 inches
    Screen Resolution
    IDK
    Hard Drives
    IDK
    PSU
    IDK
    Case
    HP
    Cooling
    ?
    Keyboard
    Razer
    Mouse
    Razer
    Internet Speed
    Office
    Browser
    Windows 11
    Antivirus
    ?

Latest Support Threads

Back
Top Bottom