How do I enable Internet Sharing using the command line?

Is there a way to enable Internet Sharing on Windows 7 (or higher) using the command line ? Perhaps using "netsh" or a similar command?

+4
source share
3 answers

I think this question should be on superuser.com. And he is: https://superuser.com/questions/470319/how-to-enable-internet-connection-sharing-using-command-line .

If you're curious about how to do this programmatically, here is the source code on GitHub: https://github.com/utapyngo/icsmanager .

+2
source

To manage a "shared Internet connection" in Win7, you must run net start SharedAccess or net stop SharedAccess .

You can also configure the service using sc config SharedAccess start= disabled or sc config SharedAccess start= auto and some others. Run sc config to find other options for "start =". The space between start = OPTION is a must.

0
source
  • Run cmd as admin and enter the following netsh wlan set hostednetwork mode=allow ssid=networkname key=networkpassword
  • Press enter, then type NETSH WLAN start hostednetwork

  • click again.

do not forget to replace the network name and network password with your preferred names and password, respectively

0
source

Source: https://habr.com/ru/post/1491445/


All Articles