Basically, we’ll use the “netsh.exe” builtin utility here to achieve theses tasks.
Show TCP/IP settings :
netsh interface ip show config
Set the interface as DHCP :
netsh interface ip set address "Local Area Connection" dhcp
Set interface DNS server address :
netsh interface ip set dns "Local Area Connection" static 0.0.0.0
Export the current configuration :
netsh -c interface dump > c:\nic.cfg
Import a configuration :
netsh -f c:\nic.cfg