I can do it manually by right-clicking on a network connection, opening the Sharing tab and clicking on the "Allow other network users to connect through this computer's Internet connection" check box.
Now I need to automate this task. Is there a command-line tool or a Powershell cmdlet to accomplish this?
Best Answer
Here is a pure PowerShell solution (should be run with administrative privileges):
See also this question at social.msdn.microsoft.com: