Configure name server settings (VBScript)
This code can be found in
Chapter 14 of DNS on Windows Server 2003
Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.
Find out how to download all of the VBScript code from this site.
' Configure several name server settings
' ---------------------------------------------------------------
' From the book "DNS on Windows Server 2003"
' By Cricket Liu, Matt Larson & Robbie Allen
' Publisher: O'Reilly and Associates
' ISBN: 0-596-00562-8
' Book web site: http://rallenhome.com/books/dnsonw2k3/toc.html
' ---------------------------------------------------------------
strServer = "terminator.movie.edu"
on error resume next
set objDNS = GetObject("winMgmts:\\" & strServer & "\root\MicrosoftDNS")
set objDNSServer = objDNS.Get("MicrosoftDNS_Server.Name="".""")
Wscript.Echo objDNSServer.Name & ":"
' See Table 14-1 for an explanation of each of these settings
objDNSServer.EventLogLevel = 4
objDNSServer.LooseWildcarding = TRUE
objDNSServer.MaxCacheTTL = 900
objDNSServer.MaxNegativeCacheTTL = 60
objDNSServer.AllowUpdate = 3
objDNSServer.Put_
if Err then
Wscript.Echo " Error occurred: " & Err.Description
else
WScript.Echo " Change successful"
end if
|
This code has been viewed 1608 times.
|
New from the creators of TechTasks.com:
StatSheet.com
|