Delivery Optimization Not Listening

3 min read Original article ↗

Earlier this week, I was tagged in a Twitter (X) thread regarding Delivery Optimization not listening on port 7680 even though the Delivery Optimization service (DoSvc) was running. First, in general, a healthy Windows machine with content to share would typically listen to traffic on that port, but there are scenarios where it won't. So, in this post, you'll find three sections:

  • Verifying that DO is listening
  • Valid reasons why DO is Not listening
  • Resources

Verifying that DO is listening

Verifying that DO is listening is something you can easily verify by either netstat or PowerShell:

Option #1 – Netstat

Run the following command in an elevated Command prompt (Not PowerShell):

netstat -aon | find "7680"
Using netstat to verify if DO is listening

Option #2 – PowerShell

Run the following command in an elevated PowerShell prompt:

Get-NetTCPConnection -LocalPort 7680 | Format-List
Using PowerShell to verify if DO is listening

Valid reasons why DO is Not listening

As mentioned in the intro to this blog post, DO will typically listen assuming it's service is running, but there are indeed scenarios where it won't.

Why DO is not listening #1 – Nothing to share

There are no files to share, meaning the client has not downloaded any files via DO, or no files have been marked as sharing. That can be verified by running the following command in an elevated PowerShell prompt:

Get-DeliveryOptimizationStatus | Where-Object { $_.Status -eq "Caching" } | Select FileSize, SourceURL

If there are no files to share, the DO service won't listen…

Why DO is not listening #2 – Peering disabled

Another reason could be that you turned off peering either by configuring the DO download mode to either mode 0 (HTTP only, no peering) or mode 99 (HTTP only, no peering, no use of DO cloud service). The download mode can be verified by using the native DO cmdlets in Windows, by querying the WMI Bridge Provider (thanks, Gary Blok, for that tip), or by checking the local registry. Here are some PowerShell examples for these options:

# Option 1 - Get DO settings via native DO cmdlets
Get-DOConfig -Verbose

# Option 2 - Get DO settings via the WMI Bridge Provider
$NameSpace = "root\cimv2\mdm\dmmap"
$MDMDOClass = Get-CimClass -Namespace $NameSpace | Where-Object {$_.CimClassName -like "MDM_Policy_Result01_DeliveryOptimization*"} | Select-Object -Property CimClassName
$MDMDOInstance = Get-CimInstance -Namespace $NameSpace -ClassName $MDMDOClass.CimClassName
$MDMDOInstance

# Option 3 - Get DO settings via the registry
Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" 
Showing DO settings via PowerShell.

Resources

For more info about scripting with the WMI Bridge Provider, check the official docs:

Using PowerShell scripting with the WMI Bridge Provider
https://learn.microsoft.com/en-us/windows/client-management/using-powershell-scripting-with-the-wmi-bridge-provider