Greeting Team,
I am looking for configure the default site search for MS Edge/Chrome Browsers through BigFix or automate script. I have tried below script to create registry entries but its not worked. I also found search engine/site information store in “web data” for chrome not in registry. please guide.
Replace with your actual URL and name
$SearchEngineURL = “https://xyz.com/search/pages/results.aspx?k=%s”
$SearchEngineName = “xyz Search”
$searchEngineKeyword = “@xyz”
path for search engines
$GPPath = “HKLM:\Software\Policies\Microsoft\Edge\Search”
Add the search engine to the registry
New-Item -Path $GPPath -Name $SearchEngineName -ItemType Directory -Force
New-ItemProperty -Path $GPPath$SearchEngineName -Name “URL” -Value $SearchEngineURL -Type String -Force
New-ItemProperty -Path $GPPath$SearchEngineName -Name “DisplayName” -Value $SearchEngineName -Type String -Force
New-ItemProperty -Path $GPPath$SearchEngineName -Name “DefaultEngine” -Value $searchEngineKeyword -Type String -Force
New-ItemProperty -Path $GPPath$SearchEngineName -Name “EnableDefaultSearchProvider” -Value 1
Welcome @amikush
The question is, are you able to configure the default site search locally by running your script outside of BigFix?
If you can successfully achieve it manually on the endpoint, then it can also be automated and pushed through BigFix. However, if it doesn’t work locally, it will not work via BigFix either.
Update: While doing a quick Google search, I found the link below, you can also start from here.
PowerShell Script to Manage Chrome & Edge Settings via Local Group Policy · GitHub
Thanks @vk.khurava to reply…!
No, my shared script is also not working that I run locally on machine through PowerShell however registry entries are creating but actually its not enforcing on browsers.
That’s what I thought, first, make them work locally; once successful, integrate them into the BigFix action script for further deployments.
That’s the help I m looking here…!
I tried multiple registry location but actually its not helping.
I believe Microsoft has made the browsers stop respecting some of the registry-based edits because they were a common vector for malware. I’m not sure you can change the default browser or default search pages automatically, aside from Group Policy or MDM. Otherwise I think the end-user has to click the buttons.
You could try deploying it with LGPO according to some of the example LGPO content I have here and at bigfix.me
Thanks @JasonWalker for the information. I will try and update.
Hi @amikush ,
EDGE
This can be checked from Microsoft Edge Browser Policy Documentation ManagedSearchEngines | Microsoft Learn
Instead of creating values under the Recommended key, it is better to create the values only under the Edge key.
If you create values under the Recommended subkey, these will become default policies.
I am sharing the action script which I tested and confirmed is working fine.
action uses wow64 redirection false
If {{{{exists file "__createfile"}
delete __createfile
Endif
If {{{{exists file "manage.reg"}
delete manage.reg
Endif
createfile until @end_create_reg_file
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
"SiteSearchSettings"="[{{\"name\": \"Enterprise Search\", \"shortcut\": \"search\", \"url\": \"https://sharepoint.com/search/pages/results.aspx?k={{searchTerms}\"}]"
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
"ManagedSearchEngines"="[{{\"allow_search_engine_discovery\": true}, {{\"keyword\": \"search\", \"name\": \"Enterprise Search\", \"search_url\": \"https://pgone.sharepoint.com/search/pages/results.aspx?k={{searchTerms}\"}]"
@end_create_reg_file
move __createfile manage.reg
waithidden regedit /s "manage.reg"
CHROME:
The “@” prefix for shortcuts is a feature for manual site search creation in Chrome, but it’s not supported when defining SiteSearchSettings via Windows Registry policies.
Need to adjust registry entry by removing the “@” from the shortcut, and then we can apply the policy successfully. For reference: Chrome Enterprise Policy List & Management | Documentation
3 Likes
Thanks a lot @divyam.maithani. It’s working… 
1 Like