Files

31 lines
1.3 KiB
PowerShell

<#
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