In my lab testing, I always have to change my DNS servers manually before I can join to my domain since I use my router’s DHCP server, so I can’t tell what DNS servers my test machines use.
I finally got around to doing a simple google search and voila! I found the below .bat file that queries for the adapter name, and sets the DNS servers for you. Very nicely written bat script.
Tested this on Windows 10 and worked perfectly on my e6420.
Just change the IP Addresses in teh code below and run this script before your join domain post install task runs on your K2000.
NOTE: I tested this on Windows 10 successfully
.bat file code:
:: Set primary and alternate DNS for IPv4 on Windows Server 2000/2003/2008 &
:: Windows XP/Vista/7
FOR /F "tokens=* delims=:" %%a IN ('IPCONFIG ^| FIND /I "ETHERNET ADAPTER"') DO (
REM Removes "Ethernet adapter" from the front of the adapter name
REM Removes the colon from the end of the adapter name
netsh interface ipv4 set dns name="!adapterName!" static 10.0.0.120 primary
netsh interface ipv4 add dns name="!adapterName!" 220.127.116.11 index=2