diff --git a/Registry Key Scripts/Disable Windows Web Search.ps1 b/Registry Key Scripts/Disable Windows Web Search.ps1 index e4a7014..eef2b6d 100644 --- a/Registry Key Scripts/Disable Windows Web Search.ps1 +++ b/Registry Key Scripts/Disable Windows Web Search.ps1 @@ -1,2 +1,31 @@ -New-Item -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows -Name Explorer -Force -New-ItemProperty HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name DisableSearchBoxSuggestions -Value 1 -Force \ No newline at end of file +<# +Author: Gabe Kerntke +Date: 08-20-2025 + +.Synopsis + +.Modified +2025-08-20 (GabeK) - Original script created + +#> + +#Region Script Start +If (Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer") { + $Get_Value = Get-ItemProperty "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableSearchBoxSuggestions" | Select-Object -ExpandProperty DisableSearchBoxSuggestions + If ($Get_Value -ne "1"){ + Set-ItemProperty "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableSearchBoxSuggestions" -Value 1 -Force + Write-Host "Reg Key Value Updated:" + Get-ItemProperty "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableSearchBoxSuggestions" + } + Else { + Write-Host "Reg Key already present with correct value:" + Get-ItemProperty "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableSearchBoxSuggestions" + } +} +Else { + New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows" -Name "Explorer" -Force + New-ItemProperty "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableSearchBoxSuggestions" -Value 1 -Force + Write-Host "Reg Key Created:" + Get-ItemProperty "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableSearchBoxSuggestions" +} +#Region Script End \ No newline at end of file