I have a wifi adapter, or it could be a notebook, and I share the internet via Wifi, that's not the problem, here's how I create a wifi network:
Create a wifi network
Access the CMD as an administrator; netsh wlan set hostednetwork mode=allow ssid=nomeHost key=senha
netsh wlan start hostednetwork
With these steps I leave the wifi network to connect, and to give access the internet over the network, access to the control panel > network and internet > Network connection.
After that, in the cable network properties, the default, usually "Ethernet", on the sharing tab, select the first and option, and in the Home Connection select the local connection that was created by the command, usually "Local Connection *", something like this.
Problem:
I would like to execute the steps of sharing via the command line, because sometimes during the day I need to reboot, because it simply stops working.
If someone at least knows what I can use, some windows component. I do not want programs that do this for me, I want to do it myself.