23 May 2012

Enable or Disable IPv6 with a script or registry entry

I recently found something interesting while doing DirectAccess troubleshooting.  DirectAccess requires IPv6 to work.  On a stock standard Dell built machine I found that despite the check box for IPv6 being enabled there was no IPv6 active.



You can see that on IPv4 is visible when doing an ipconfig


What you should be seeing is the following that contains IPv6 addresses



The reason for this is that the IPv6 components are disbled via the registry.  For more info on this you can check  http://support.microsoft.com/kb/929852

Below are two scripts one to enable this and the other to disable it.


To Enable

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\DisabledComponents", "0" ,"REG_DWORD"

To Disable


Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\DisabledComponents", "255" ,"REG_DWORD"




The thing I do find very interesting is that it is being disabled by Dell where the default is to have it enabled.


2 comments:

Jason Jones said...

What an odd decision by Dell???

Anonymous said...

The value should be 0xFF, to avoid 5 second boot delay.

You can set it with a GPO, CMD, PowerShell:

http://www.sysadmit.com/2015/08/windows-deshabilitar-ipv6.html

Post a Comment