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.