Get Windows 11 Mobile Hotspot connected device amount or device’s name in CMD

12yo 0 Reputation points
2023-09-25T15:24:21.4533333+00:00

I am developing an app that need to displays the device amount or device’s name of mobile devices connected to my Windows mobile hotspot in Windows 11. My mobile hotspot work without any issue, but when I try to use CMD 'netsh wlan show hostednetwork,', it not work and did not show any device. Additionally, when running the command 'NETSH WLAN show drivers' in CMD, it indicates that the hosted network is not supported. Is there any alternative method to retrieve the connected device amount or device’s name?

Thank you!

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,766 Reputation points
    2023-09-26T11:03:30.08+00:00

    Hello 12yo,

    Hosted Networks and Ad Hoc Networks are deprecated sincd Windows 10. Windows 10 and further already natively has the Mobile Hotspot Feature, use that.

    https://support.microsoft.com/en-us/windows/use-your-windows-pc-as-a-mobile-hotspot-c89b0fad-72d5-41e8-f7ea-406ad9036b85

    In Windows 11, you can first check the connection status by using the next Powershell cmdlet, from an administrator window:

    Get-NetConnectionProfile | Where-Object { $_.Name -like "YOUR_HOTSPOT_NAME" }

    Then, to see the connected devices information, use:

    Get-NetTCPConnection | Where-Object { $_.LocalAddress -eq "YOUR_HOTSPOT_IP_ADDRESS" }

    (*Replace "YOUR_HOTSPOT_IP_ADDRESS" with the IP address of your mobile hotspot. You can find this information in your hotspot settings.)

    --If the reply is helpful, please Upvote and Accept as answer--


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.