Updated:
The following will now ignore the case of the Computer name by adding the /I argument to the If statement.
[INDENT=2]@Echo Off[/INDENT]
[INDENT=2] [/INDENT]
[INDENT=2]Set csv=\Server\Share\pcsetup\ipchanger\ComputerList.csv[/INDENT]
[INDENT=2] [/INDENT]
[INDENT=2]for /f “skip=1 delims=, tokens=1-7” %%a in (%csv%) do ([/INDENT]
[INDENT=2] if /I “%computername%”==“%%a” ([/INDENT]
[INDENT=2] [/INDENT]
[INDENT=2] netsh int ipv4 set address “Local Area Connection” static %%b %%c %%d[/INDENT]
[INDENT=2] netsh int ipv4 set dnsserver “Local Area Connection” static %%e[/INDENT]
[INDENT=2] netsh int ipv4 add dnsserver “Local Area Connection” %%f[/INDENT]
[INDENT=2] netsh int ipv4 add dnsserver “Local Area Connection” %%g[/INDENT]
[INDENT=2] [/INDENT]
[INDENT=2] )[/INDENT]
[INDENT=2])[/INDENT]
[INDENT=2]REM Pause[/INDENT]
[INDENT=2]Echo On[/INDENT]