Shell Script Makes Managing DHCP Scopes Easier
You can use the Windows 2003 Netsh command-line utility to automatically change network settings, including DHCP configurations. Here's a .cmd script that uses Netsh to create and manage DHCP scopes.
May 1, 2008
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 windowsitpro.com/windowsscripting/article/articleid/49862/create-dhcp-scopes.html. 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.
About the Author
You May Also Like