Add primary intranet search location
Ajouter un emplacement de recherche Intranet principal
Explanation
Enabling this policy allows you to add a primary intranet search location within Windows Desktop Search. The value of this text should be:
name,url
For example:
Intranet,http://intranetsearch.aspx?k=$w
You must provide the following:
1) A name for the scope, such as 'Intranet'.
2) The URL to the search service. Use $w in place of the query term for the search service URL.
If your intranet search service is SharePoint Portal Server, your query should resemble the following:
http://sitename/Search.aspx?k=$w
If your intranet search service is Windows SharePoint Services (WSS), the query should resemble the following, where XXXX is the locale ID of your WSS Service. For example, the English locale ID is 1033.
http://sitename/_layouts/XXXX/searchresults.aspx?SearchString=$w
This adds intranet search location to:
1) The Windows Deskbar
2) The Desktop Search results search box
3) The WDS search box in Search Companion
L’activation de cette stratégie permet d’ajouter un emplacement de recherche intranet principal dans Windows Desktop Search. Ce texte doit avoir la valeur suivante :
nom,url
Par exemple :
Intranet,http://intranetsearch.aspx?k=$w
Vous devez indiquer les éléments suivants :
1) Nom du périmètre, tel que 'Intranet'.
2) URL du service de recherche. Utilisez $w à la place du mot recherché pour l’URL du service de recherche.
Si votre service de recherche intranet est SharePoint Portal Server, votre requête doit ressembler à ce qui suit :
http://nom_site/Search.aspx?k=$w
Si votre service de recherche intranet est Windows SharePoint Services (WSS), la requête doit ressembler à ce qui suit, où XXXX correspond à l’ID des paramètres régionaux de votre service WSS. Par exemple, l’ID des paramètres régionaux français est 1036.
http://nom_site/_layouts/XXXX/searchresults.aspx?SearchString=$w
Cette action ajoute un emplacement de recherche intranet aux éléments suivants :
1) barre de recherche WDS
2) zone des résultats Desktop Search
3) zone de recherche WDS du Compagnon de recherche
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: Search/AddPrimaryIntranetSearchScope
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Intranet Search Scope Url
Set-ItemProperty -Path $k -Name 'PrimaryIntranetSearchScopeUrl' -Value '<value>' -Type StringDisable
# Disable: Search/AddPrimaryIntranetSearchScope
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": Search/AddPrimaryIntranetSearchScope
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search'
Remove-ItemProperty -Path $k -Name 'PrimaryIntranetSearchScopeUrl' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Intranet Search Scope UrlUrl de la zone de recherche IntranetPrimaryIntranetSearchScopeUrl | Text boxtext | PrimaryIntranetSearchScopeUrl | REG_SZ |