1

On macOS (and Linux using Avahi), you have access to dns-sd, a command that lets you discover and announce services on your local network.

I know that Windows 10 and 11 have native support for Bonjour/mDNS, but I haven't found any way to access the service using the command line. Is there an equivalent to dns-sd on Windows?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Leo Bernard
  • 174
  • 1
  • 9
  • 1
    Have you try to use [utility](https://stackoverflow.com/questions/54216363/) from Bonjour SDK ? – Daemon-5 Nov 14 '22 at 02:26
  • That would work, but I'd prefer if my customers didn't have to install the Bonjour SDK for this to work when Windows already has APIs for this. – Leo Bernard Nov 14 '22 at 13:41

2 Answers2

1

Quite a bit more limited than dns-sd, but can be used for discovery (i.e. a combination of the -B, -L and -G operations in dns-sd):

https://github.com/microsoft/FindDevice

You can download a zip with the exe and its gazillion libraries (I'm really not convinced all of those are actually needed). No install required (just extract the zip or copy the already unzipped folder), runs as a regular user.

You will however need admin rights to open the firewall.

jcaron
  • 17,302
  • 6
  • 32
  • 46
  • 1
    To make it really useful, you need to specify the name of the service you're looking for, e.g. `.\FindDevice --service "_http._tcp.local"` and `.\FindDevice --service "_smb._tcp.local"` have the best chance of being found. The firewall notification pops up automatically. Works fine, just unzip. – insaneinvader May 24 '23 at 18:10
-1

Your customers don't have to install the SDK. You can download and install the SDK and then just copy C:\Windows\System32\dns-sd.exe to a network drive or similar where your customers can access and use it.

Johnny
  • 115
  • 7
  • I believe this is incorrect. The dns-sd.exe needs at least dnssd.dll to run, but more importantly, the Bonjour service the be running to do anything. – jcaron Mar 16 '23 at 15:38