Windows 10 周年更新后 Internet 连接共享停止工作

And*_*ehm 9 windows-10 windows-10-v1607

自从更新到 Windows 10 1607(“周年更新”)后,我的共享 WiFi 适配器不再共享。

我与 Hyper-V 交换机共享 WiFi 连接,以便我的 VM 可以通过 Surface Pro 2 的 WiFi 连接访问 Internet。但自更新以来,这仅在手动禁用和重新启用 Internet 连接共享后才有效。否则即使在 WiFi 属性中设置了该选项,互联网共享也不起作用。

一个想法?

互联网连接共享

And*_*ehm 7

这是我现在使用的脚本,它可以工作:

param(
    $sPublicAdapterName,
    $sPrivateAdapterName
)

if (!$sPrivateAdapterName) {
    Write-Host "EnableSharing.ps1 sPublicAdapterName sPrivateAdapterName"
    return
}#if

# Constants
$public = 0
$private = 1

Write-Host "Creating netshare object..."
$netshare = New-Object -ComObject HNetCfg.HNetShare

Write-Host "Getting public adapter..."
$publicadapter = $netshare.EnumEveryConnection | Where-Object {
    $netshare.NetConnectionProps($_).Name -eq $sPublicAdapterName
}#foreach

Write-Host "Getting private adapter..."
$privateadapter = $netshare.EnumEveryConnection | Where-Object {
    $netshare.NetConnectionProps($_).Name -eq $sPrivateAdapterName
}#foreach

Write-Host "Disabling and enabling public sharing for public adapter...."
$netshare.INetSharingConfigurationForINetConnection($publicadapter).DisableSharing()
$netshare.INetSharingConfigurationForINetConnection($publicadapter).EnableSharing($public)
$netshare.INetSharingConfigurationForINetConnection($publicadapter)

Write-Host "Disabling and enabling private sharing for private adapter...."
$netshare.INetSharingConfigurationForINetConnection($privateadapter).DisableSharing()
$netshare.INetSharingConfigurationForINetConnection($privateadapter).EnableSharing($private)
$netshare.INetSharingConfigurationForINetConnection($privateadapter)

# Clean up
Remove-Variable netshare
Run Code Online (Sandbox Code Playgroud)


小智 5

我也有同样的问题。

重新启动后,“Internet 连接共享”不会启动,其启动状态设置为手动(已触发)。但即使我手动启动它或将启动状态设置为“自动”,该服务也会启动并继续工作,但在我的 WAN 接口上禁用并重新启用 ICS 之前,我的家庭网络中没有 Internet 访问权限。

我通过全新安装 W10 build 1607 三次检查了此行为,它的行为始终相同。我为我的网络适配器尝试了不同的驱动程序版本 - 来自 Windows Update 的默认驱动程序、来自英特尔网站的最新版本以及我的笔记本电脑制造商提供的最新驱动程序 - 问题仍然存在。

我还全新安装了 W10 build 1511,并且 Internet 连接共享工作正常,直到我安装了周年更新。升级后,ICS 服务启动状态设置为“自动”,并在系统启动时启动,但我的家庭网络中的 Internet 访问无法正常工作,直到禁用/重新启用 WAN 接口上的 ICS。

有趣的是 - 互联网连接共享在我的 Windows 10 build 1607 旧笔记本电脑上确实运行得很好,但现在我把它卖了,我没有办法找到配置上的差异来解决问题。我一周前购买当前的笔记本电脑(Dell Precison M4800)后才遇到这个问题。但由于我尝试了干净的 Windows 安装和不同的驱动程序,我认为这不仅仅与我的计算机有关,特别是因为在周年更新后还有其他人遇到此问题:

http://answers.microsoft.com/en-us/windows/forum/windows_10-networking/ics-internet-connection-sharing-dosent-work-in/a203c90f-1214-4e5e-ae90-9832ae5ceb55

http://answers.microsoft.com/en-us/windows/forum/windows_10-networking/internet-connection-sharing-no-longer-works-ver/1c8ffdff-84e8-4124-b1a5-379df6eb2959

因此恢复到Win10 build 1511似乎是目前唯一的解决方案。

UPD:这是一个解决方法 - 您可以安排在每次计算机启动时运行脚本,这将在所需接口上禁用并重新启用 ICS。

您可以从此线程中获取脚本:How to enable Internet ConnectionSharing using command line?