poniedziałek, 2 kwietnia 2018

TMG DNS cache - draft

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!"

Brak komentarzy:

Prześlij komentarz