Open in the explorer

Turn off Microsoft Peer-to-Peer Networking Services

Désactiver les services réseau pair à pair Microsoft

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › Microsoft Peer-to-Peer Networking Services FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Activer les services réseau pair à pair Microsoft
Supported on
At least Windows XP Professional with SP2 FR: Au minimum Windows XP Professionnel avec SP2
ADMX file
p2p-pnrp.admx
Internal name
p2p-pnrp/P2P_Disabled

Explanation

This setting turns off Microsoft Peer-to-Peer Networking Services in its entirety, and will cause all dependent applications to stop working.

Peer-to-Peer protocols allow for applications in the areas of RTC, collaboration, content distribution and distributed processing.

If you enable this setting, peer-to-peer protocols will be turned off.

If you disable this setting or do not configure it, the peer-to-peer protocols will be turned on.

French text from Windows 11 26H2

Ce paramètre désactive entièrement les services réseau pair à pair Microsoft et provoque l’arrêt de toutes les applications qui en dépendent.

Les protocoles de réseau pair à pair permettent d’intégrer aux applications des fonctionnalités de collaboration en temps réel ou non, de distribution de contenu et de traitement distribué.

Si vous activez ce paramètre, les protocoles de réseau pair à pair sont désactivés.

Si vous désactivez ce paramètre ou si vous ne configurez pas, les protocoles de réseau pair à pair sont activés.

Registry

HKEY_LOCAL_MACHINE\Software\policies\Microsoft\Peernet
Value name
Disabled
StateValue written
Enablednot defined in the ADMX
Disablednot defined in the ADMX

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.

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: p2p-pnrp/P2P_Disabled
$k = 'HKLM:\Software\policies\Microsoft\Peernet'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'Disabled' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)

Disable

# Disable: p2p-pnrp/P2P_Disabled
$k = 'HKLM:\Software\policies\Microsoft\Peernet'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'Disabled' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": p2p-pnrp/P2P_Disabled
$k = 'HKLM:\Software\policies\Microsoft\Peernet'
Remove-ItemProperty -Path $k -Name 'Disabled' -ErrorAction SilentlyContinue

Availability