PowerShell enable/disable ICS and allow other adapter access
The
-InternetInterfaceName
parameter is passed the name of the network adaptersadapter which you want to enable ICS.The
-LocalInterfaceName
parameter is passed the name of the network adapter which you want to allow to use the ICS enabled adapter's Internet.Running the
Set-MrInternetConnectionSharing -InternetInterfaceName "VPN" -LocalInterfaceName "Ethernet" -Enabled $true
command will result in