Open in the explorer

Prevent adding UNC locations to index from Control Panel

Empêcher l’ajout d’emplacements UNC à l’index depuis le Panneau de configuration

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Search FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Rechercher
Supported on
Any version of Microsoft Windows with Windows Search 4.0 or later FR: Microsoft Windows (toutes les versions) avec Windows Search 4.0 ou version ultérieure
ADMX file
Search.admx
Internal name
Search/HideUNCTab_1

Explanation

Enabling this policy prevents users from adding UNC locations to the index from the Search and Indexing Options in Control Panel. Any UNC locations that have already been added to the index by the user will not be removed.

When this policy is disabled or not configured, users will be able to add UNC locations to the index.

This policy has no effect if the Files on Microsoft Networks add-in is not installed.

Disabled by default.

French text from Windows 11 26H2

L’activation de cette stratégie empêche les utilisateurs d’ajouter des emplacements UNC à l’index à partir des options de recherche et d’indexation du Panneau de configuration. Tout emplacement UNC déjà ajouté à l’index par l’utilisateur sera conservé.

Si cette stratégie est désactivée ou non configurée, les utilisateurs peuvent ajouter des emplacements UNC à l’index.

Cette stratégie n’a aucun effet si le complément Fichiers sur les réseaux Microsoft n’est pas installé.

Ce paramètre est désactivé par défaut.

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search
Value name
HideUNCTab
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 0

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/HideUNCTab_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'HideUNCTab' -Value 1 -Type DWord

Disable

# Disable: Search/HideUNCTab_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'HideUNCTab' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": Search/HideUNCTab_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search'
Remove-ItemProperty -Path $k -Name 'HideUNCTab' -ErrorAction SilentlyContinue

Availability