Pubblicazione hash per BranchCache: valore del Registro di sistema HashPublicationForPeerCachingComputerHKLM\Software\Policies\Microsoft\Windows\LanmanServer

ID criterio
Pol_HashPublication
Ambito
Configurazione computer
Supportato in
Almeno Windows Server 2008 R2 o Windows 7
Origine
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (versione 1.0)
Categoria
Rete › Server Lanman

Registro

HashPublicationForPeerCaching

REG_DWORDComputer
Valore abilitato
Dipende dal valore dell'opzione
Elemento
Azioni pubblicazione di hash:
Opzioni
VoceValore memorizzato
Consenti pubblicazione hash solo per cartelle condivise per cui BranchCache è abilitata0
Non consentire pubblicazione hash per tutte le cartelle condivise1
Consenti pubblicazione hash per tutte le cartelle condivise2
Applica con .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

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

; Opzioni (usarne solo una)
; Consenti pubblicazione hash solo per cartelle condivise per cui BranchCache è abilitata
"HashPublicationForPeerCaching"=dword:00000000
; Non consentire pubblicazione hash per tutte le cartelle condivise
"HashPublicationForPeerCaching"=dword:00000001
; Consenti pubblicazione hash per tutte le cartelle condivise
"HashPublicationForPeerCaching"=dword:00000002
CMD
:: Opzioni (usarne solo una)

:: Consenti pubblicazione hash solo per cartelle condivise per cui BranchCache è abilitata
reg add "HKLM\Software\Policies\Microsoft\Windows\LanmanServer" /v "HashPublicationForPeerCaching" /t REG_DWORD /d 0 /f
:: Non consentire pubblicazione hash per tutte le cartelle condivise
reg add "HKLM\Software\Policies\Microsoft\Windows\LanmanServer" /v "HashPublicationForPeerCaching" /t REG_DWORD /d 1 /f
:: Consenti pubblicazione hash per tutte le cartelle condivise
reg add "HKLM\Software\Policies\Microsoft\Windows\LanmanServer" /v "HashPublicationForPeerCaching" /t REG_DWORD /d 2 /f
PowerShell
# Comune: crea la chiave
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\LanmanServer' -Force | Out-Null

# Opzioni (usarne solo una)
# Consenti pubblicazione hash solo per cartelle condivise per cui BranchCache è abilitata
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\LanmanServer' -Name 'HashPublicationForPeerCaching' -PropertyType DWord -Value 0 -Force | Out-Null
# Non consentire pubblicazione hash per tutte le cartelle condivise
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\LanmanServer' -Name 'HashPublicationForPeerCaching' -PropertyType DWord -Value 1 -Force | Out-Null
# Consenti pubblicazione hash per tutte le cartelle condivise
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\LanmanServer' -Name 'HashPublicationForPeerCaching' -PropertyType DWord -Value 2 -Force | Out-Null