Shell Script Makes Managing DHCP Scopes Easier

If you're tired of using the Microsoft Management Console (MMC) to create new DHCP scopes, you'll be glad to know that you can automate this task. Windows Server 2003 includes a utility called Netsh that you can use to manipulate DHCP server parameters at the command prompt. This means you can create DHCP scope settings with a script. Steve Seguis provides such a script--CreateDHCPScope.cmd--in the article "Create DHCP Scopes." This Windows shell script uses Netsh to create a DHCP scope on a designated server, set the IP range and default gateway, and activate the scope. Besides explaining how to use this script, Steve shows you how to modify it to create exclusions and reservations. To read "Create DHCP Scopes" and download the script, go to I opened up this article for public viewing through June 5. If you enjoy reading this article, you can get more of this type of content by subscribing to Scripting Pro VIP.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.