cmd or PowerShell equivalent to macOS' dns-sd command?

1.7k Views Asked by At

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?

2

There are 2 best solutions below

1
On

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.

1
On

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.