Microsoft KB Archive/843127

= How to use a script to set DNS cache attributes on your ISA Server 2004 computer =

Article ID: 843127

Article Last Modified on 7/16/2004

-

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(&quot;FPC.Root&quot;) '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 &quot;DNS cache settings:&quot; & vbCrLf & _ &quot; TTL of entries for unsuccessful lookups: &quot; & _ settings.DnsCacheNegativeTtl & vbCrLf & _ &quot; Maximum size of a single record: &quot; & _ settings.DnsCacheRecordMaxKB & vbCrLf & _ &quot; Maximum size of the Firewall service DNS cache: &quot; & _ settings.DnsCacheSize The following VBScript code sets a new value for the DnsCacheNegativeTtl property: ' Create the root object.

Dim root Set root = CreateObject(&quot;FPC.Root&quot;)

'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 &quot;Done!&quot; 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.

Keywords: kbinfo kbfirewall KB843127

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.