Set ip-number from commandline

Set Static IP-number

netsh interface ipv4 set address "Extern" static x.x.x.x y.y.y.y z.z.z.z
netsh interface ipv4 add dnsserver name="Extern" address=208.67.220.220 index=1
netsh interface ipv4 add dnsserver name="Extern" address=208.67.222.222 index=2

Extern is the name of your network device
x.x.x.x is your ip-number
y.y.y.y is your netmask.
z.z.z.z is your default gateway.

Enable DHCP

netsh interface ipv4 set address "Extern" source=dhcp
netsh interface ipv4 set dnsserver "Extern" source=dhcp