:startover
set /p compname= Which Workstation would you like to configure? :
psexec \\%compname% net start "remote registry"
psexec \\%compname% netsh interface ip show config
set /p runscript="Do you want to continue with changing/setting the ip address for %compname% ? (y/n) :
if %runscript%==y goto continue
if %runscript%==Y goto continue
if %runscript%==n goto disableRR
if %runscript%==N goto disableRR
goto begin
:continue
set /p IP= IP Address :
psexec \\%compname% netsh interface ip set address "local area connection 2" static %ip% 255.255.255.0 192.168.1.gateway
psexec \\%compname% netsh interface ip set dns "local area connection 2" static 192.168.1.DNS1
psexec \\%compname% netsh interface ip add dns "local area connection 2" 192.168.1.DNS2
:disableRR
psexec \\%compname% net stop "remote registry"
set /p startover="Do you want to run this again? (y/n) :"
if %startover%==y goto startover
if %startover%==Y goto startover
if %startover%==n goto end
if %startover%==N goto end
goto begin
pause