Publication de hachages pour BranchCache : valeur de Registre HashPublicationForPeerCachingOrdinateurHKLM\Software\Policies\Microsoft\Windows\LanmanServer

ID de stratégie
Pol_HashPublication
Étendue
Configuration ordinateur
Pris en charge sur
Au minimum Windows Server 2008 R2 ou Windows 7
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Catégorie
Réseau › Serveur Lanman

Registre

HashPublicationForPeerCaching

REG_DWORDOrdinateur
Valeur si activée
Dépend de la valeur de l'option
Élément
Actions de la publication de hachages :
Options
EntréeValeur stockée
Autoriser la publication de hachages uniquement pour les dossiers partagés dans lesquels BranchCache est activé0
N’autoriser la publication de hachages dans aucun dossier partagé1
Autoriser la publication de hachages pour tous les dossiers partagés2
Appliquer avec .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\LanmanServer]

; Options (en utiliser une seule)
; Autoriser la publication de hachages uniquement pour les dossiers partagés dans lesquels BranchCache est activé
"HashPublicationForPeerCaching"=dword:00000000
; N’autoriser la publication de hachages dans aucun dossier partagé
"HashPublicationForPeerCaching"=dword:00000001
; Autoriser la publication de hachages pour tous les dossiers partagés
"HashPublicationForPeerCaching"=dword:00000002
CMD
:: Options (en utiliser une seule)

:: Autoriser la publication de hachages uniquement pour les dossiers partagés dans lesquels BranchCache est activé
reg add "HKLM\Software\Policies\Microsoft\Windows\LanmanServer" /v "HashPublicationForPeerCaching" /t REG_DWORD /d 0 /f
:: N’autoriser la publication de hachages dans aucun dossier partagé
reg add "HKLM\Software\Policies\Microsoft\Windows\LanmanServer" /v "HashPublicationForPeerCaching" /t REG_DWORD /d 1 /f
:: Autoriser la publication de hachages pour tous les dossiers partagés
reg add "HKLM\Software\Policies\Microsoft\Windows\LanmanServer" /v "HashPublicationForPeerCaching" /t REG_DWORD /d 2 /f
PowerShell
# Commun : créer la clé
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\LanmanServer' -Force | Out-Null

# Options (en utiliser une seule)
# Autoriser la publication de hachages uniquement pour les dossiers partagés dans lesquels BranchCache est activé
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\LanmanServer' -Name 'HashPublicationForPeerCaching' -PropertyType DWord -Value 0 -Force | Out-Null
# N’autoriser la publication de hachages dans aucun dossier partagé
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\LanmanServer' -Name 'HashPublicationForPeerCaching' -PropertyType DWord -Value 1 -Force | Out-Null
# Autoriser la publication de hachages pour tous les dossiers partagés
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\LanmanServer' -Name 'HashPublicationForPeerCaching' -PropertyType DWord -Value 2 -Force | Out-Null