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:
This guide applies to:
This guide does not apply to devices where Spotlight is disabled via Group Policy, Intune, or enterprise configuration.
3. Prerequisites
Before proceeding, ensure:
4. Process Overview
The remediation process consists of three procedures:
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.
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:
Navigate to:
Settings → Time & Language → Date & Time
Turn OFF:
Set time automatically
Set time zone automatically
Step Two – Advance System Date
After advancing the date:
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:
Step Six – Re-enable Automatic Time
Turn ON:
Set time automatically
Set time zone automatically
8. Validation
Confirm the following:
If issues persist:
Check Policy Restrictions
sfc /scannow
10. Important Notes
Time Adjustment Warning:
This guide restores Windows Spotlight by:
Quick Tip (Highly Recommended for Word)
After pasting:
Turn this into a branded corporate SOP template (cover page + versioning + change log)
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
- Spotlight images not updating
- Lock screen stuck on a static image
- Desktop Spotlight not rotating
- Black or blank backgrounds
This guide applies to:
- Windows 11 version 25H2
- Local administrator environments
- Systems where Spotlight is enabled but not functioning correctly
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
Navigate to:
Settings → Time & Language → Date & Time
Turn OFF:
Set time automatically
Set time zone automatically
Step Two – Advance System Date
- Click: Change (under manual date/time)
- Adjust the system date: +14 days ahead (two weeks)
After advancing the date:
- Lock and unlock the device multiple times
- Leave system idle briefly
- Ensure internet connection is active
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
If issues persist:
Check Policy Restrictions
- Verify Spotlight is not disabled by:
- Group Policy
- Intune
- Registry enforcement
- Ensure background apps are not globally disabled
- Internet must be active
- Disable metered connection if enabled
sfc /scannow
10. Important Notes
- Always run scripts as Administrator
- Follow steps in order
- Allow time for content to refresh after reset
- Do not perform on domain-controlled systems unless approved
- Incorrect system time may impact:
- Authentication
- Certificates
- Scheduled tasks
This guide restores Windows Spotlight by:
- Resetting Spotlight components
- Clearing corrupted caches
- Forcing content refresh via time adjustment
- Restoring normal system configuration
After pasting:
- Select all text
- Apply styles:
- Headings → Heading 1 / Heading 2
- Insert: References → Table of Contents
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
- ?







