Update Registry Key Scripts/Disable Windows Web Search.ps1
This commit is contained in:
@@ -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
|
||||
<#
|
||||
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
|
||||
Reference in New Issue
Block a user