Jared Heinrichs

  • Technology Blog
  • Winnipeg Computer Repair
  • Winnipeg Photographer
  • Cooking With Jared
You are here: Home / Operating System / Windows 2008 / Netsh commands in Windows 2008

Mar 19, 2009 By Jared Heinrichs Leave a Comment

Netsh commands in Windows 2008

IP and DNS

Netsh can accomplish many tasks, and one of those is to set a system’s IP address and DNS servers. Like the IPv4 Properties GUI that you’ll find in the full Server 2008 installation, Netsh lets you choose to either assign a static IP address or get IP information from a DHCP server. Using DHCP makes for a simpler command, so let’s start with that:

netsh interface ipv4 set address name="Local Area Connection" source=DHCP

DHCP is the default setting, so it’s more likely that you’ll want to set a static IP address. To do so, assemble a Netsh command on one line as follows:

netsh interface ipv4 set address name="Local Area Connection"
source=static address=X.x.x.x mask=255.255.255.0 gateway=X.x.x.x

Notice that the gateway is now optional. Some older versions of Netsh complained if you left the default gateway’s IP address off a Netsh command.

For example, to assign a static IP address of 192.168.2.2 on a /24 network with a default gateway address of 192.168.2.1, you’d type:

netsh int ip set address “local area connection” static 192.168.2.2 255.255.255.0 192.168.2.1

Finally, you’ll want to specify one or more DNS servers’ IP addresses that your Server Core system can use for resolving names. Netsh can do that, but the syntax is a bit unexpected: You use netsh int ip set dns to set the preferred DNS server and netsh int ip add dns to specify your additional choices. The syntax for setting the first DNS server is easier than for setting the IP address:

netsh int ip set dns “local area connection” static 10.50.50.4

Filed Under: Windows 2008

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Board Game Rules
  • Camera
  • Computer Hardware
    • Blackberry
    • drivers
    • iPad
    • Magic Jack
    • USB
  • Damn Small Linux
  • Exam Notes
  • Facebook
  • FREE Flashcards
  • Games
    • PC
      • League of Legends
    • Wii
    • xbox 360
  • Music
  • Networking
    • Cisco Certification
    • Mitel
    • Palo Alto Firewall
  • News
    • Google
    • Microsoft
  • Operating System
    • Active Directory (2003)
    • Android
    • Command Prompt
    • Damn Small Linux
    • Group Policy
    • Hyper-V
    • IIS
    • ISA 2006
    • Mac OS X
    • Microsoft Exchange Server
    • Powershell
    • Security
    • SME Server
    • Terminal Server 2003
    • Ubuntu Linux
      • Adito Web SSL VPN
      • OpenVpn-als
      • Webmin
    • Virtual Machine Manager
    • Windows 2003 SBS
    • Windows 2003 Server
    • Windows 2008
    • Windows 2008 R2
    • Windows 2012R2
    • Windows 7
    • Windows 8
    • Windows Command Line
    • Windows Deployment Services
    • Windows Server Backup
    • Windows Vista
    • Windows XP
  • Phones
  • Photography
  • Photos
    • Animals
    • Misc
    • Nature
    • Portraits
  • Portfolio
  • Programming
    • CSS
    • HTML
    • jQuery
    • MySQL
    • PHP
    • Script
  • Programs
    • Acrobat
    • Acrobat Reader
    • Adobe Dreamweaver
    • Adobe Illustrator
    • Adobe Photoshop
    • Anti-virus Software
    • Antivirus
    • Backup Exec
    • Bittorent
    • Blackberry BESADMIN
    • Internet Explorer 9
    • Lightroom
    • Microsoft Office
    • Netbeans
    • Onenote
    • Outlook
    • Shelby
    • Sysprep
    • Trend
    • Video Editing
    • Visual Studio
    • Windows Live Writer
    • WireShark
    • XP Mode
    • Zarafa
  • Recipe
  • Review
  • Software Links
  • Troubleshooting
  • Uncategorized
  • Videos
  • Web Applications
    • Brage
    • Google
    • Spiceworks
    • Wordpress
  • Web Browsers
    • Internet Explorer
  • Web Server
    • XAMPP
  • Winnipeg
    • ISP

Try searching this site!

Copyright © 2021 Winnipeg Web Design