A PowerShell project that brings a Bing Spotlight-like lock screen experience to Windows 11-10 LTSC. Should also work with non-LTSC Windows and probably not with Home versions.
The project downloads the current Bing image, renders a text banner on top of it, applies the generated image to the Windows lock screen through the registry, keeps a local image history, and falls back to the latest valid image if Bing is unavailable.
Windows Spotlight is not natively available on some LTSC editions. This project provides a simple, local, and installable alternative based on Windows PowerShell 5.1.
- interactive installation
- Bing market selection during setup
- configurable retention for generated images
- automatic fallback to the latest valid image
- UHD image download with automatic resize to screen resolution
- QR code linking to a Wikipedia search for the image subject
- local logging
- scheduled task running as
SYSTEM - clean uninstall with explicit confirmation
- Windows 11 LTSC
- Windows PowerShell 5.1
- Administrator rights
- Install-BingSpotlight.ps1: installs the solution and creates the scheduled task
- BingSpotlight.ps1: main script executed by the scheduled task
- Uninstall-BingSpotlight.ps1: clean uninstaller
- plan.md: design notes and technical details
Open PowerShell as Administrator in the project directory.
If script execution is blocked on the machine, temporarily allow it for the current session:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassThen run the installer:
.\Install-BingSpotlight.ps1The installer asks for:
- how many days generated images should be kept
- which Bing market to use, for example
fr-FRoren-US
After installation, the files are copied to:
C:\ProgramData\BingSpotlight
C:\ProgramData\BingSpotlight\
├── BingSpotlight.ps1
├── Uninstall-BingSpotlight.ps1
├── config.json
├── logs\
│ └── BingSpotlight.log
├── source\
│ └── bing_source.jpg
└── rendered\
├── lockscreen_2026-03-22.jpg
└── ...
The configuration file is created automatically here:
C:\ProgramData\BingSpotlight\config.json
Example:
{
"Market": "fr-FR",
"RetentionDays": 14,
"RetryCount": 5,
"RetryDelaySeconds": 15
}At each run, the main script:
- reads
config.json - calls the Bing API for the configured market
- downloads the UHD version of the current image (3840x2160)
- detects the primary screen resolution via WMI
- resizes the image to match the screen resolution
- renders the title and copyright on the image
- saves a dated image in
rendered - applies that image to the lock screen through
HKLM - removes older images according to the configured retention period
If the screen resolution cannot be detected (e.g. headless SYSTEM session), the UHD source is used as-is.
Using a dated filename helps reduce Windows lock screen caching issues.
Each rendered image includes a small QR code on the right side of the banner. Scanning it opens a Wikipedia search page for the image subject, using the language matching the configured Bing market.
The QR code is generated via the goqr.me public API. If the API is unreachable, the image is rendered normally without the QR code.
The project does not blindly overwrite the current state when Bing is unavailable.
- network calls use configurable retry logic
- if Bing remains unavailable, the script tries to reapply the latest valid image stored in
rendered - if no valid image exists yet, the run fails cleanly and writes the error to the log
To trigger an immediate test run:
Start-ScheduledTask -TaskPath "\Custom\" -TaskName "BingSpotlight_LockScreen"Then verify:
- that a
lockscreen_*.jpgfile appears inC:\ProgramData\BingSpotlight\rendered - that the log contains a complete successful run
- that the lock screen shows the generated image
Quick log check:
Get-Content "C:\ProgramData\BingSpotlight\logs\BingSpotlight.log" -Tail 20Expected lines usually include:
[INFO] Execution started. RetentionDays=...
[INFO] Metadata retrieved: ...
[INFO] Source image downloaded.
[INFO] Rendered image created: ...
[INFO] Registry updated successfully.
[INFO] Cleanup finished.
To uninstall:
C:\ProgramData\BingSpotlight\Uninstall-BingSpotlight.ps1The script asks the user to type OUI to confirm, then it:
- removes the
\Custom\BingSpotlight_LockScreenscheduled task - clears
PersonalizationCSPvalues if they still point to the installation directory - removes
C:\ProgramData\BingSpotlight
- the project targets Windows PowerShell 5.1, not PowerShell 7 as the primary runtime
System.Drawingis used for image rendering- the QR code is generated via the goqr.me public API; if it is down, the image renders without it
- the Bing endpoint used here is an unofficial
HPImageArchiveAPI - this project is not affiliated with Microsoft
This repository is licensed under the GNU Affero General Public License v3.0.
See LICENSE.
