Select a method to restrict Peer Selection: registry value DORestrictPeerSelectionByComputerHKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization
- Policy ID
- RestrictPeerSelectionBy
- Scope
- Computer Configuration
- Supported on
- At least Windows Server 2016, Windows 10
- Source
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
- Category
- Windows Components › Delivery Optimization
Registry
DORestrictPeerSelectionBy
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Restrict Peer Selection By:
| Item | Stored value |
|---|---|
| None | 0 |
| Subnet mask | 1 |
| Local discovery (DNS-SD) | 2 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization] ; Options (use only one) ; None "DORestrictPeerSelectionBy"=dword:00000000 ; Subnet mask "DORestrictPeerSelectionBy"=dword:00000001 ; Local discovery (DNS-SD) "DORestrictPeerSelectionBy"=dword:00000002
CMD
:: Options (use only one) :: None reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" /v "DORestrictPeerSelectionBy" /t REG_DWORD /d 0 /f :: Subnet mask reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" /v "DORestrictPeerSelectionBy" /t REG_DWORD /d 1 /f :: Local discovery (DNS-SD) reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" /v "DORestrictPeerSelectionBy" /t REG_DWORD /d 2 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization' -Force | Out-Null # Options (use only one) # None New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization' -Name 'DORestrictPeerSelectionBy' -PropertyType DWord -Value 0 -Force | Out-Null # Subnet mask New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization' -Name 'DORestrictPeerSelectionBy' -PropertyType DWord -Value 1 -Force | Out-Null # Local discovery (DNS-SD) New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization' -Name 'DORestrictPeerSelectionBy' -PropertyType DWord -Value 2 -Force | Out-Null