Set Static IP
netsh interface ip set address local static IP_address subnet_mask gateway metric_of_gateway
You will find the interface name from Start - Control Panel - Network Connections.
Set NIC DNS setings
netsh interface ip set dns local static IP_address
Configure NIC to get IP settings from DHCP Server
netsh interface ip set address local source=dhcp
netsh interface ip set dns local source=dhcp