Change Tracking - Configuration via Script

Change Tracking configuration is stored together with ISA configuration, in a VPS (Vendor Parameter Set). Note that it's a different VPS than the change log! As we already know, you can configure Change Tracking either on the array or on the enterprise. This is implemented as one VPS for each array, and one for the whole enterprise.

You can configure enable/disable Change Tracking via a script which changes these VPSs. Note that the following script always changes the enterprise VPS on ISA Enterprise Edition - changing that to change just the current array is left as an exercise to the reader.

 const fpcIsaStandardEdition = &H10&
const fpcIsaEnterpriseEdition = &H20&

Set fpc = CreateObject("FPC.Root")
If fpc.IsaEdition = fpcIsaStandardEdition Then
    Set VendorSets = fpc.GetContainingArray.VendorParametersSets
Else
    Set VendorSets = fpc.Enterprise.VendorParametersSets
End If

On Error Resume Next
Set VendorSet = VendorSets.Item( "{123558F0-6D04-4781-AC2B-5C54DCEDBCFD}" )
If Err.Number <> 0 Then
    Err.Clear
    On Error GoTo 0
    Set VendorSet = VendorSets.Add( "{123558F0-6D04-4781-AC2B-5C54DCEDBCFD}" )
End If
On Error GoTo 0

VendorSet("Enabled") = True
'VendorSet("AskDescription") = False
'VendorSet("MaxEntries") = 1000

VendorSets.Save 0, 0

WScript.Echo "Change Tracking is now enabled"

[TMG Update] In TMG, Change Tracking is enabled by default, so there's little need to configure it. If needed, you can do it through the ChangeTracking API:

 const fpcIsaStandardEdition = &H10
const fpcIsaEnterpriseEdition = &H20

Set fpc = CreateObject("FPC.Root")
If fpc.IsaEdition = fpcIsaStandardEdition Then
    Set ChangeTracking = fpc.GetContainingArray.ChangeTracking
Else
    Set ChangeTracking = fpc.Enterprise.ChangeTracking
End If

'ChangeTracking.Enabled = False  ' Nooooooooooooooo!
ChangeTracking.MaxEntries = 2000
ChangeTracking.Save 0, 0

WScript.Echo "Change Tracking max entries now set to 2000"

 -Jonathan Barner, ISA Sustained Engineering Team