在 Windows 10 中,有没有办法在没有控制面板的情况下为特定网络适配器禁用 IPv6

Is there a way to disable IPv6 for a specific network adapter without the Control Panel in Windows 10

如果您进入 Windows 中的网络适配器设置,右键单击一个适配器,然后单击“属性”,您可以看到所有支持的协议,配置、激活和停用它们。如果您的系统语言是德语,我添加了一张照片这看起来如何。

我想为其中一个网络适配器停用 IPv6 协议,但我想自动执行该过程,以便其他用户在执行我的程序(具有管理员权限)时不必执行此过程.

有什么办法可以实现吗?我知道 there is a way to do this in the Registry,但它会影响整个系统而不是单个适配器(并且需要重新启动,我想避免)。我也找了一个 netsh 命令,但没有找到。

I also looked for a netsh command, but did not found one.

仅在 windows 10 系统上测试,您可以使用 Disable-NetAdapterBinding 禁用对网络适配器的绑定。

在 PowerShell 中输入以下命令行(运行 作为管理员),

disable-NetAdapterBinding -Name 'Ethernet' -ComponentID ms_tcpip6

Ethernet 是您需要禁用的适配器的名称。