Quick: Helpful list of netsh commands for your Windows Server Core 2008R2 Installation

As I’m now configuring all my new virtual servers, many of which are Core installations, I need a helpful list of netsh commands which allow me to configure network interfaces and so on, this is a handy guide for me as much as anyone else:

  1. Change an interface’s name:
    netsh interface set interface name="Local Area Connection" newname="LAN"
  2. Change an interface’s MTU (for jumbo frames etc):
    netsh interface ipv4 set subinterface "LAN" mtu=WHATEVER store=persistent
  3. List IP4 interfaces:
    netsh interface ipv4 show interfaces
  4. Set IP4 address:
    netsh interface ipv4 set address name="ID" source=static address=StaticIP mask=SubnetMask gateway=DefaultGateway
  5. Add some DNS Servers:
    netsh interface ipv4 add dnsserver name="ID" address=DNSIP
  6. Set back to DHCP:
    netsh interface ipv4 set address name="ID" source=dhcp