Logon scripts to enable IPv6?
Frank Bulk - iName.com
frnkblk at iname.com
Tue Mar 30 23:02:48 CEST 2010
Below you'll find what I came up with. I had to use a product called
"runasspc" (http://robotronic.de/runasspc/) in order to run the netsh
commands as a privileged user.
======================================================================
Excerpt from logon script:
======================================================================
if "%allusersprofile%"=="C:\ProgramData" goto WinVista
if %os%==Windows_NT goto WinXP
::
::if it gets here, assume 9x base
::
exit
::
:WinVista
\\NT1\netlogon\runasspc /cryptfile:"\\NT1\netlogon\vista7.spc" /quiet
goto fin
::
:WinXP
\\NT1\netlogon\runasspc /cryptfile:"\\NT1\netlogon\xp.spc" /quiet
goto fin
:fin
======================================================================
ipv6-xp.bat
======================================================================
@echo off
netsh interface ipv6 show interface | find "1280" > nul
if errorlevel 1 goto NotInstalledonWinXP
echo IPv6 already installed on Windows XP
goto ReapplyingonWinXP
::
:NotInstalledonWinXP
echo Installing IPv6 on Windows XP
netsh interface ipv6 install
netsh interface ipv6 reset
netsh interface ipv6 set privacy disabled persistent
netsh interface ipv6 isatap set state disabled
netsh interface ipv6 6to4 set state disabled
netsh interface ipv6 set teredo disabled
netsh interface ipv6 delete interface "Teredo Tunneling Pseudo-Interface"
active
netsh int ipv6 renew
echo IPv6 installed.
shutdown -r -t 10 -c "Restarting computer after IPv6 installation"
goto fin
:ReapplyingonWinXP
echo Reapplying IPv6 configuration on Windows XP
netsh interface ipv6 set privacy disabled persistent
netsh interface ipv6 isatap set state disabled
netsh interface ipv6 6to4 set state disabled
netsh interface ipv6 set teredo disabled
netsh interface ipv6 delete interface "Teredo Tunneling Pseudo-Interface"
active
echo IPv6 configuration reapplied.
goto fin
:fin
======================================================================
ipv6-vista7.bat
======================================================================
@echo off
netsh interface ipv6 show interfaces | find "1280" > nul
if "%errorlevel%" == "0" goto NotInstalledonWinVista7
echo IPv6 already installed on Windows Vista and Windows 7
goto ReapplyingWinVista7
:NotInstalledonWinVista7
echo Installing IPv6 on Windows Vista and Windows 7
netsh interface ipv6 reset
netsh interface ipv6 set privacy state=disable
netsh interface ipv6 set global randomize identifiers=disabled
netsh interface ipv6 6to4 set state disabled default
netsh interface ipv6 isatap set state disabled
netsh interface ipv6 set teredo disabled
regedit /s \\nt1\netlogon\ipv6-vista7.reg
echo IPv6 installed.
shutdown /r /t 10 /c "Restarting computer after IPv6 installation"
goto fin
:ReapplyingWinVista7
echo Reapplying IPv6 on Windows Vista and Windows 7
netsh interface ipv6 set privacy state=disable
netsh interface ipv6 set global randomize identifiers=disabled
netsh interface ipv6 6to4 set state disabled default
netsh interface ipv6 isatap set state disabled
netsh interface ipv6 set teredo disabled
echo IPv6 configuration reapplied.
goto fin
:fin
======================================================================
ipv6-vista7.reg
======================================================================
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters]
"DisabledComponents"=dword:00000001
======================================================================
-----Original Message-----
From: Frank Bulk - iName.com [mailto:frnkblk at iname.com]
Sent: Friday, March 19, 2010 10:29 AM
To: 'ipv6-ops at lists.cluenet.de'
Subject: Logon scripts to enable IPv6?
Has anyone developed or come across Windows logon scripts that enables IPv6
and turns off all 6to4, ISATAP, and Teredo for Windows XP SP2, Vista, and 7?
I'm looking to deploy native IPv6 access (SLAAC-based) across our 60-node
corporate network, and I'd rather do it via logon scripts than policies.
Regards,
Frank
More information about the ipv6-ops
mailing list