⚡ PowerShell 5.1+

Check "Disable Windows Spotlight on Desktop" Status

Reads the current registry value behind the "Disable Windows Spotlight on Desktop" tweak so you can confirm whether it's applied.

By WindowsScripting.com · 893 B
Test-DisableWindowsSpotlightStatus.ps1
<#
.SYNOPSIS
    Checks whether "Disable Windows Spotlight on Desktop" is currently applied.

.DESCRIPTION
    Reads HKCU:\Software\Policies\Microsoft\Windows\CloudContent \ DisableSpotlightCollectionOnDesktop and reports its current value,
    or reports that it isn't set (falling back to the Windows default).

.EXAMPLE
    .\Test-DisableWindowsSpotlightStatus.ps1
#>

[CmdletBinding()]
param()

$regPath = 'HKCU:\Software\Policies\Microsoft\Windows\CloudContent'

$value = Get-ItemProperty -Path $regPath -Name 'DisableSpotlightCollectionOnDesktop' -ErrorAction SilentlyContinue

if ($null -eq $value) {
    Write-Host "'DisableSpotlightCollectionOnDesktop' is not set at $regPath (using the Windows default)." -ForegroundColor Yellow
} else {
    Write-Host "Current value of 'DisableSpotlightCollectionOnDesktop': $($value.'DisableSpotlightCollectionOnDesktop')" -ForegroundColor Green
}