Using WMI to Automatically Configure DNS

Discover an alternative solution to automatically configure DNS when you create new Web sites.

Tim Huckaby

February 10, 2003

1 Min Read
ITPro Today logo in a gray background | ITPro Today

In addition to scripting a home-grown solution to automatically configure DNS, you have another option courtesy of Microsoft—using Windows Management Instrumentation (WMI) to configure DNS through scripting. Actually, using WMI is a much more elegant solution to configure DNS than the brute-force approach that reader Adam Smith used in dns.vbs. Better yet, WMI includes a simple API. Along with some great examples, the process of using WMI to configure DNS is well documented on the Microsoft Developer Network (MSDN) Web site at http://msdn.microsoft.com. Unfortunately, using WMI to configure DNS has some drawbacks, so it isn't clearly a better solution.

The first drawback is practical: The examples on the MSDN Web site don't measure up to the functionality that the dns.vbs script provides. For example, the WMI examples don't provide a means to create the additional FTP host (A) record. However, you can add this functionality without too much trouble. A second drawback for some users is that WMI is suitable for only Windows 2000 and later. The third, and most important, drawback is that you must install WMI on Win2K—WMI doesn't come with the OS. This limits Microsoft IIS and network administrators, most of whom won't allow the installation of WMI on production servers—not because it isn't safe but because it's new and, consequently, not well understood, which introduces risk. Interestingly enough, WMI is part of the Windows Server 2003 OS, so no installation is required.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like