Hello,
Welcome to Microsoft Q&A!
Currently, there is no direct way to detect if this is supported. Generally, we will create a WiFiDirectAdvertisementPublisher Class and call the WiFiDirectAdvertisementPublisher.Start Method first before we searching for wifi direct devices. If the WiFiDirectAdvertisementPublisher.Status Property is not Started, the device may not support the wifi direct function.
Another way is to use the Device Portal Rest API to request the networking information. Here is the document: Networking. But you need to enable the Device Portal
in your device before you start to call the rest API.
The way that running the ipconfig command in CMD is the easiest way to check the WiFi Direct capability.
Thank you.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.