From a64e8fc3e6f160c033e9f7b1659189d6b8f9ed8b Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Wed, 25 Aug 2021 00:27:53 +0300 Subject: [PATCH] Add files via upload --- Sophia/PowerShell 5.1/Module/Sophia.psm1 | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/Sophia/PowerShell 5.1/Module/Sophia.psm1 b/Sophia/PowerShell 5.1/Module/Sophia.psm1 index d3d8841e..18c8115d 100644 --- a/Sophia/PowerShell 5.1/Module/Sophia.psm1 +++ b/Sophia/PowerShell 5.1/Module/Sophia.psm1 @@ -1341,13 +1341,13 @@ function TailoredExperiences <# .SYNOPSIS - Bing search in the Start Menu (for the USA only) + Bing search in the Start Menu .PARAMETER Disable - Disable Bing search in the Start Menu (for the USA only) + Disable Bing search in the Start Menu .PARAMETER Enable - Enable Bing search in the Start Menu (for the USA only) + Enable Bing search in the Start Menu .EXAMPLE BingSearch -Disable @@ -1381,21 +1381,15 @@ function BingSearch { "Disable" { - if ((Get-WinHomeLocation).GeoId -eq 244) + if (-not (Test-Path -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) { - if (-not (Test-Path -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) - { - New-Item -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force - } - New-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name DisableSearchBoxSuggestions -PropertyType DWord -Value 1 -Force + New-Item -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force } + New-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name DisableSearchBoxSuggestions -PropertyType DWord -Value 1 -Force } "Enable" { - if ((Get-WinHomeLocation).GeoId -eq 244) - { - Remove-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name DisableSearchBoxSuggestions -Force -ErrorAction Ignore - } + Remove-ItemProperty -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name DisableSearchBoxSuggestions -Force -ErrorAction Ignore } } }