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:


Microsoft has released a KB article how to disable the individual IPv6 components in Windows – but not for an individual interface:

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
Changing a Template or Templatepath in Word Documents via Script
Change DNS settings on multiple Windows Servers and Workstations
1 Comment
  • July 9, 2015 at 21:36

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

Leave Your Comment

Your Comment*

Your Name*
Your Webpage