PowerShell Windows

Disable IPv6 in Windows for a specific network connection only

Sometimes you want to disable IPv6 only on a specified network interface, instead of disabling IPv6 completely:

IPv6_Bind

Microsoft has released a KB article how to disable the individual IPv6 components in Windows – but not for an individual interface:
https://support.microsoft.com/en-us/kb/929852

I wrote a small PowerShell script that unbinds the IPv6 protocol. The PowerShell script is modifying the bindings in the registry – therefore a reboot is needed for this setting to take effect:

$UnbindID = $(Get-WmiObject -Class 'Win32_NetworkAdapter' | Where-Object {$_.NetConnectionID -eq 'Ethernet'}).GUID
$LinkageKey = $(Get-ItemProperty -Path 'HKLM:SYSTEMCurrentControlSetservicesTcpip6Linkage').Bind | Select-String -Pattern $UnbindID -NotMatch -SimpleMatch
Set-ItemProperty -Path 'HKLM:SYSTEMCurrentControlSetservicesTcpip6Linkage' -Name 'Bind' -Type MultiString -Value $LinkageKey

Note: According to your environment and operating system version and language, you may need to change the network connection name (‘Ethernet’ in my example’) to fit your interface / connection name.

You may also like
VBScript: Ping Function
XenDesktop: Change mouse scheme to speedup user experience
Set Creation- and Modification-Date from Filename
1 Comment
  • 2015-07-09T21:36:52+00:000000005231201507 at 21:36
    Reply

    Hi Michael,
    nice blog post and cool new blog design!

Leave Your Comment

Your Comment*

Your Name*
Your Webpage