Skip to main content
Bounty Ended with 50 reputation awarded by Ecstasy
deleted 1 character in body
Source Link

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 enter image description here

  • The -InternetInterfaceName parameter is passed the name of the network adapters 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 enter image description here

PowerShell enable/disable ICS and allow other adapter access

  • The -InternetInterfaceName parameter is passed the name of the network adapter 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 enter image description here

added 203 characters in body
Source Link

There are a couple simple functions to help with this task inusing PowerShell version 3.0+ that'sthat are written and talked about in the Configure Internet Connection Sharing with PowerShell post that I confirmed works with Windows 10.

I'll shorten it up a bit and post just the parts of the PowerShell commands which you need to complete the task you describeddescribe, but you can read over the full post for more detail if needed.

After declaring the two functions, you simply just need to run one line of code to enable the ICS between the VPN and Ethernet adapter. When done, you can run another line of code to disable the ICS feature entirely from the VPN adapter.

There are a couple simple functions to help with this task in PowerShell version 3.0+ that's written about in the Configure Internet Connection Sharing with PowerShell post that I confirmed works with Windows 10.

I'll shorten it up a bit and post just the parts of the PowerShell commands which you need to complete the task you described, but you can read over the full post for more detail if needed.

After declaring the two functions, you simply just need to run one line of code to enable the ICS between the VPN and Ethernet adapter. When done, you can run another line of code to disable the ICS entirely from the VPN adapter.

There are a couple functions to help with this task using PowerShell version 3.0+ that are written and talked about in the Configure Internet Connection Sharing with PowerShell post that I confirmed works with Windows 10.

I'll shorten it up a bit and post just the parts of the PowerShell commands which you need to complete the task you describe, but you can read over the full post for more detail if needed.

After declaring the two functions, you simply just need to run one line of code to enable the ICS between the VPN and Ethernet adapter. When done, you can run another line of code to disable the ICS feature entirely from the VPN adapter.

added 203 characters in body
Source Link

There'sThere are a couple simple functions to help with this task in PowerShell version 3.0+ that's written about tinin the Configure Internet Connection Sharing with PowerShell post that I confirmed works with Windows 10.

After declaring the two functions, you simply just need to run one line of code to enable the ICS between the VPN and network adaptersEthernet adapter. When done, you can run another line of code to disable the ICS betweenentirely from the network adaptersVPN adapter.

I'll post theThe full code with the functions to actually run for it to work at the bottom with the functionsis below, but I want to clarify a few things in this section first to help ensure you understand how to get it to work for your task and try to clarify as best as possible.

Full PowerShell CodeFull PowerShell Code

Script Source

There's a couple simple functions to help with this task in PowerShell version 3.0+ that's written about tin the Configure Internet Connection Sharing with PowerShell post that I confirmed works with Windows 10.

After declaring the two functions, you simply just need to run one line of code to enable the ICS between the VPN and network adapters. When done, you can run another line of code to disable the ICS between the network adapters.

I'll post the full code to actually run for it to work at the bottom with the functions, but I want to clarify a few things in this section first to help ensure you get it to work for your task and try to clarify as best as possible.

Full PowerShell Code

There are a couple simple functions to help with this task in PowerShell version 3.0+ that's written about in the Configure Internet Connection Sharing with PowerShell post that I confirmed works with Windows 10.

After declaring the two functions, you simply just need to run one line of code to enable the ICS between the VPN and Ethernet adapter. When done, you can run another line of code to disable the ICS entirely from the VPN adapter.

The full code with the functions to run for it to work is below, but I want to clarify a few things in this section first to help ensure you understand how to get it to work for your task.

Full PowerShell Code

Script Source

Source Link
Loading