<< Back to Script Library

Disable online services for Windows 10 Search

This script disconnects Windows 10 search from Bing and Cortana online services, hiding online content from search results.
Version: 1.4.5
Created: 2020-02-09
Modified: 2020-02-09
Creator: ek
Downloads: 33
Tags: bing cortana search windows 10
The Script Copy Script Copied to clipboard
$searchkey = $null
try {
$searchkey = Get-Item -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search' -ErrorAction Stop
} catch {
Write-Output "The Search registry key does not exist, so this user session is probably not running on Windows 10"
}

$valueexists = $false
if ($searchkey -ne $null) {
    try {
    $bingvalue = Get-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search' -Name 'BingSearchEnabled' -ErrorAction Stop
    if ($bingvalue.BingSearchEnabled -eq 0) { 
        Write-Output "No change performed. BingSearchEnabled = 0"
     } else {
        Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search' -Name 'BingSearchEnabled' -value '0' -Force -ErrorAction Stop
        if ($?) { Write-Output "BingSearchEnabled value set to 0" } else { Write-Output "Error setting registry value" }
     }
    } catch {    
    New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled" -Value 0 -PropertyType DWORD
    if ($?) { Write-Output "BingSearchEnabled value created, value set to 0" } else { Write-Output "Error creating registry value" }
    }
}