I got tired of having to click on the network icon and the mobile hotspot button every time my computer starts or the mobile hotspot turns off automatically, so I wanted to automate the process using a batch file through the Task Scheduler.
netsh wlan start hostednetwork
However this command does not work for me and results in the following message:
The hosted network couldn't be started.
The group or resource is not in the correct state to perform the requested operation.
I found on Can't start hostednetwork that I should enable the 'Microsoft Hosted Network Virtual Adapter' in Device Manager, but I have 'Microsoft Wi-Fi Direct Virtual Adapter' and 'Microsoft Wi-Fi Direct Virtual Adapter #2' instead.
I'm not sure if 'Microsoft Hosted Network Virtual Adapter' and 'Microsoft Wi-Fi Direct Virtual Adapter' are somehow related such that I can use a slightly different command from the command prompt to allow a batch file.
What can I do to turn on mobile hotspot via cmd?