How to use a script to set DNS cache attributes on your ISA Server 2004 computer (843127)



The information in this article applies to:

  • Microsoft Internet Security and Acceleration Server 2004, Standard Edition

INTRODUCTION

In Microsoft Internet Security and Acceleration (ISA) Server 2004, you can use a script to set the attributes of the Domain Name System (DNS) cache. You can use a script to set the DnsCacheNegativeTtl property, the DnsCacheRecordMaxKB property, and the DnsCacheSize property of the FPCLowLevelSettings object without manually editing the registry.

Note The FPCLowLevelSettings object is an ISA Server Admin COM object.

MORE INFORMATION

The following Microsoft Visual Basic Scripting Edition (VBScript) code displays the current values of the DnsCacheNegativeTtl property, of the DnsCacheRecordMaxKB property, and of the DnsCacheSize property on the local ISA Server computer.
' Create the root object.
Dim root
Set root = CreateObject("FPC.Root")
 
'Declare the other objects that are necessary.
Dim array       ' An FPCArray object
Dim settings    ' An FPCLowLevelSettings
 
' Get references to the array object and to the low-level 
' settings object.
Set array = root.GetContainingArray
Set settings = array.ArrayPolicy.LowLevelSettings
 
WScript.Echo "DNS cache settings:" & vbCrLf & _ 
             "  TTL of entries for unsuccessful lookups: " & _
                settings.DnsCacheNegativeTtl & vbCrLf & _
             "  Maximum size of a single record: " & _
                settings.DnsCacheRecordMaxKB & vbCrLf & _
             "  Maximum size of the Firewall service DNS cache: " & _
                settings.DnsCacheSize
The following VBScript code sets a new value for the DnsCacheNegativeTtl property:
' Create the root object.

Dim root
Set root = CreateObject("FPC.Root")

'Declare the other objects that are necessary.

Dim Policy       ' An FPCArrayPolicy object

' Get an array policy object and set the new value of the
' DnsCacheNegativeTtl property of the low-level 
' settings object.    

Set Policy = root.GetContainingArray.ArrayPolicy
Policy.LowLevelSettings.DnsCacheNegativeTtl = 7200

Policy.Save

WScript.Echo "Done!"
You can edit the sample VBScript code to set a new value for the DnsCacheRecordMaxKB property and for the DnsCacheSize property.

Note These scripts do not have error checking or error handling.

MORE INFORMATION

For more information, see the ISA Server Software Development Kit (SDK) documentation.

Modification Type:MajorLast Reviewed:7/16/2004
Keywords:kbFirewall kbinfo KB843127 kbAudITPRO