Can I disable WSD (Web Services for Devices) on Server 2012/R2? How?

Solution 1:

I'm afraid there is no "Off"-switch for WSD specifically for Printer discovery in Windows Server

As an alternative to disabling the "Function Discovery Provider Host" service, you could change the following outbound rules' Action to Deny, in the Windows Firewall with Advanced Security:

enter image description here

This will specifically block WSD and WSDAPI discovery events

If your print servers are segregated from your printer networks, block interzone traffic on these specific ports instead:

  • TCP 5357 - WSDAPIEvents
  • TCP 5358 - WSDEvents Secure
  • UPD 3702 - WSD publishing

I don't think you need to disable WSD inbound on your Print Servers.

Solution 2:

1) Merge this reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WSDPrintDevice]
"Type"=dword:00000001
"Start"=dword:00000004
"ErrorControl"=dword:00000001
"Tag"=dword:00000028
"ImagePath"=hex(2):00,00
"DisplayName"="@WSDPrint.Inf,%WSDPrintDevice.SVCDESC%;WSD Print Support"
"Group"="Extended Base"
"Owners"=hex(7):00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WSDPrintDevice\Enum]
"Count"=dword:00000000
"NextInstance"=dword:00000000

That disables WSD print service from starting and removes the location of WSDPrint.Inf if something wants to force it to start.

2) Rename the extensions on these 3 files in your WINDOWS\INF folder to .bak :

WSDPrint.Inf
WSDPrint.PNF
WSDScDrv.inf

That prevents WSD print devices from starting.

While WSD printers are shown in Add Printer window, and it seems you can add them, WSD ports are never created, and the WSD driver for printer is not installed. All criteria satisfied. Verified in Windows Server 2012 R2.

1 Drawback: You should rename the 3 files back to their original names before doing any Windows Updates related to printing or WSD. And then change them back to .bak after patch installed successfully.


Solution 3:

The service you want is the "Function Discovery Provider Host" (also called fdPHost). This will disable the WS-Discovery protocol. This has a side effect of disabling SSDP support as well, however.


Solution 4:

Install the printer manually through Devices and Printers to the network. Select the option to "Add a printer using a TCP/Ip address or hostname. In the next window, make sure to change the the Device Type option to TCP/IP Device and NOT the Auto Detect option (which is generally the default). Enter the IP address of the printer and click Next. Finish the install as normal from this point. This should resolve this issue.