Disable IPv6 Registry Script

Hey all!

Just wondering if anyone knew of a good registry script to fully disable IPv6 on Windows 2008 and 2008 R2.

I know you can add a DWORD(32-Bit) key into the registry to disable it but i was wondering if anyone had a script to do this?


Who is Participating?

Improve company productivity with a Business Account.Sign Up

Russell_VenableConnect With a Mentor Commented:
You will need to remove the binding GUID for the NIC you wish IPV6 to be turned off under HKLM\Software\CurrentControlSet\Services\TCpip6\Linkage\ from all 3 categories: Bind, Export, and Route.

You can find the GUID for each NIC Adapter in a friendly readable comparison by looking at thr corresponding listing at HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersiion\NetworkCards.

Each item under this key is numbered for a specific NIC installed. If you open one of the items and check it's subkeys, you will see a "Description" value and a "ServiceName".  Take the ServiceName value as your GUID and remove that value for the NIC card you want disabled for IPV6 in each of the 3 linkage subkeys listed.

A example script to read and write this value using vbscript would be

Dim Reg, Read, Write
Set Reg = WScript.CreateObject("WScript.Shell")
Read = Reg.RegRead("HKLM\SYSTEM\CurrentControlSet\Services\Tcpipv6\Parameters\DisabledComponents")
If Read <> 0 Then
'This disables IPV6 on all NIC adapters when "DisabledComponents" is missing
  '1 = On 0 = Off -1 or 0xFF = Disabled
  Write = Reg.RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\Tcpipv6\Parameters\DisabledComponents", -1, "REG_DWORD")
   WScript.Echo("Key already exists!")  
End If

Be sure to export the keys your about to change so you change them back by importing them from the saved *.Reg file if something isn't right. You should always have a way to restore back to the way it was since editing the registry is a critical task.
LyonJayAuthor Commented:
Basically convert this http://support.microsoft.com/kb/929852 into a script.
Darius GhassemCommented:
Do you want deploy through  the gpo? You can export once you have done once on a server in the registry this will create a registry import file you can import in other servers
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

LyonJayAuthor Commented:
Nope just execute it on a server when I need to.
Darius GhassemCommented:
You can go through the registry add these keys


You can then right-click on the key and export this out. You can then import on any server after making the changes
LyonJayAuthor Commented:

Removed the bits I didn't need in the script and it worked beautifully!

You know which part in the registry I need to change so that it unticks the IPv6 box in Local Area Connection?


Darius GhassemCommented:
Unchecking IPv6 doesn't fully disable IPv6
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.