Setting Configuration Storage Server Delay Times

In Microsoft ISA Server 2004 Enterprise Edition, the configuration settings for an array are stored centrally on Configuration Storage servers along with the configuration settings for any other arrays and the enterprise-level configuration settings in your organization. For each array, you can specify a primary Configuration Storage server and an alternate Configuration Storage server. An array member initially uses the primary Configuration Storage server as its current Configuration Storage server. By default, each array member polls its current Configuration Storage server for configuration changes every 15 seconds (the default polling time). If the primary Configuration Storage server is unavailable for 30 minutes (the default fallback delay), the array member switches to the other Configuration Storage server, if an alternate Configuration Storage servers is specified. After using the alternate Configuration Storage server for six hours (the default primary testing delay), the array member periodically tests for connectivity with the primary Configuration Storage server. After the primary Configuration Storage server is continuously available for 10 minutes (the default primary stabilization time), the array member switches back to it.

The FPCConfigurationStorageServerConnection administration COM object provides the following properties for setting the Configuration Storage server delay times:

  • ChangePollRate. This property gets or sets the time (in seconds) that each array member will wait before checking the current Configuration Storage server for configuration changes again (the polling time). Its default value is 15 seconds, and its range of permissible values is from 3 through 999,999.
  • FallbackDelay. This property gets or sets the time (in minutes) after which an array member will start using the other Configuration Storage server when the current Configuration Storage server is unavailable. Its default value is 30 minutes, and its range of permissible values is from 1 through 99,999.
  • PrimaryTestingDelay. This property gets or sets the time (in minutes) after which an array member will start testing for connectivity with the primary Configuration Storage server when using the alternate Configuration Storage server. Its default value is 360 minutes (6 hours), and its range of permissible values is from 1 through 99,999.
  • PrimaryStabilizationDelay. This property gets or sets the time (in minutes) during which the primary Configuration Storage server must be continuously available before an array member will reconnect to it. Its default value is 10 minutes, and its range of permissible values is from 1 through 99,999.

The Microsoft Visual Basic Scripting Edition (VBScript) code in SetCssDelayTimes.vbs (listed below) sets the polling time, fallback delay, primary testing delay, or primary stabilization delay for the containing array to the value specified by the user, or resets the values of all four times to their default values and saves the new values to persistent storage. Note that this script must be run on an array member and that the specified Configuration Storage server must be available.

Usage:[CScript] SetCssDelayTimes.vbs CCS UserName Domain Password Action [NewValue]

CSS specifies the name of a Configuration Storage Server for the array.

UserName specifies the user name of an ISA Server administrator with read/write permissions for accessing the array configuration.

Domain specifies the domain of the user specified in UserName.

Password specifies the password of the user specified in UserName.

Action specifies one of the following actions:

  • P. Set the polling time.
  • F. Set the fallback delay.
  • T. Set the primary testing delay.
  • S. Set the primary stabilization delay.
  • D. Reset all four delay times to their default values.

NewValue specifies the new value of the property (required for P, F, T, or S).

To set the polling time, fallback delay, primary testing delay, or primary stabilization delay

  1. Create an instance of the FPC COM object, which is known as the root object and provides access to the other ISA Server administration COM objects.

  2. Declare an FPCArray object and an FPCConfigurationStorageServerConnection object.

  3. Call the ConnectToConfigurationStorageServer method on the root object to connect to the Configuration Storage server specified by the user using the user name, domain name, and password provided by the user.

  4. Get references to the FPCArray object and the FPCConfigurationStorageServerConnection object.

  5. Retrieve the current value of the applicable property.

  6. If the current value is not equal to the new value requested, change the value of the property to the new value and save the change.

To reset the values of all four properties to their default values

  1. Perform steps 1 through 4 of the procedure for setting the polling time, fallback delay, primary stabilization delay, or primary testing delay.

  2. If the current value of the ChangePollRate property of the connection object differs from its default value, set the property to its default value and display the new value in a message to the user.

  3. If the current value of the FallbackDelay property of the connection object differs from its default value, set the property to its default value and display the new value in a message to the user.

  4. If the current value of the PrimaryTestingDelay property of the connection object differs from its default value, set the property to its default value and display the new value in a message to the user.

  5. If the current value of the PrimaryStabilizationDelay property of the connection object differs from its default value, set the property to its default value and display the new value in a message to the user.

  6. Call Save on the array object to save any changes that were made.

Script Listing: SetCssDelayTimes.vbs

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Copyright (c) Microsoft Corporation. All rights reserved.

' THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE

' RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE

' USER. USE AND REDISTRIBUTION OF THIS CODE, WITH OR WITHOUT MODIFICATION, IS

' HEREBY PERMITTED.

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' This script connects to the Configuration Storage server specified by the

' user using the credentials of a specified ISA Server administrator with

' read/write permissions for accessing the array configuration. The script then

' sets the polling time, fallback delay, primary stabilization delay, or primary

' testing delay for the containing array to the value specified by the user, or

' resets the values of all four properties to their default values.

' Note that this script must be run on an array member and the specified

' Configuration Storage server for the array must be available.

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Option Explicit

Main(WScript.Arguments)

Sub Main(args)

Dim action ' A String

Dim newValue ' An Integer

action = ""

If (args.Count > 4) Then

action = UCase(args(4))

newValue = CInt(args(5))

End If

If(args.Count = 5 And action = "D") Then

ResetDefaults args(0), args(1), args(2), args(3)

ElseIf(args.Count = 6 AND (action = "P" Or action = "F" Or _

action = "T" Or action = "S")) Then

SetCssDelayTimes args(0), args(1), args(2), args(3), action, newValue

Else

Usage()

End If

End Sub

Sub SetCssDelayTimes(css, userName, domain, password, action, newValue)

' Declare the objects needed.

Dim root ' The FPCLib.FPC root object

Dim isaArray ' An FPCArray object

Dim cssCn ' An FPCConfigurationStorageServerConnection object

Dim currentValue ' An Integer

' Create the root obect.

Set root = CreateObject("FPC.Root")

' Connect to the Configuration Storage server.

root.ConnectToConfigurationStorageServer css, userName, domain, password

' Get references to the array object

' and the connection object.

Set isaArray = root.GetContainingArray()

Set cssCn = isaArray.ConfigurationStorageServerConnection

' Change the value of the property if necessary.

Select Case action

Case "P"

currentValue = cssCn.ChangePollRate

WScript.Echo "Current polling rate: " & currentValue

If newValue <> currentValue Then

cssCn.ChangePollRate = newValue

WScript.Echo "Saving the new value " & newValue & " ..."

isaArray.Save

WScript.Echo "Done!"

End If

Case "F"

currentValue = cssCn.FallbackDelay

WScript.Echo "Current fallback delay: " & currentValue

If newValue <> currentValue Then

cssCn.FallbackDelay = newValue

WScript.Echo "Saving the new value " & newValue & " ..."

isaArray.Save

WScript.Echo "Done!"

End If

Case "T"

currentValue = cssCn.PrimaryTestingDelay

WScript.Echo "Current primary testing delay: " & currentValue

If newValue <> currentValue Then

cssCn.PrimaryTestingDelay = newValue

WScript.Echo "Saving the new value " & newValue & " ..."

isaArray.Save

WScript.Echo "Done!"

End If

Case "S"

currentValue = cssCn.PrimaryStabilizationDelay

WScript.Echo "Current primary stabilization delay: " & currentValue

If newValue <> currentValue Then

cssCn.PrimaryStabilizationDelay = newValue

WScript.Echo "Saving the new value " & newValue & " ..."

isaArray.Save

WScript.Echo "Done!"

End If

End Select

End Sub

Sub ResetDefaults(css, userName, domain, password)

' Declare constants needed

Const defaultChangePollRate = 15

Const defaultFallbackDelay = 30

Const defaultPrimaryTestingDelay = 360

Const defaultPrimaryStabilizationDelay = 10

' Declare the objects needed.

Dim root ' The FPCLib.FPC root object

Dim isaArray ' An FPCArray object

Dim cssCn ' An FPCConfigurationStorageServerConnection object

' Create the root obect.

Set root = CreateObject("FPC.Root")

' Connect to the Configuration Storage server.

root.ConnectToConfigurationStorageServer css, userName, domain, password

' Get references to the array object

' and the connection object.

Set isaArray = root.GetContainingArray()

Set cssCn = isaArray.ConfigurationStorageServerConnection

' Change the values of the properties if necessary.

If defaultChangePollRate <> cssCn.ChangePollRate Then

cssCn.ChangePollRate = defaultChangePollRate

WScript.Echo "Setting the polling time to " & defaultChangePollRate _

& " minutes (the default) ..."

End If

If defaultFallbackDelay <> cssCn.FallbackDelay Then

cssCn.FallbackDelay = defaultFallbackDelay

WScript.Echo "Setting the fallback delay to " & defaultFallbackDelay _

& " minutes (the default) ..."

End If

If defaultPrimaryTestingDelay <> cssCn.PrimaryTestingDelay Then

cssCn.PrimaryTestingDelay = defaultPrimaryTestingDelay

WScript.Echo "Setting the primary testing delay to " _

& defaultPrimaryTestingDelay & " minutes (the default) ..."

End If

If defaultPrimaryStabilizationDelay <> cssCn.PrimaryStabilizationDelay Then

cssCn.PrimaryStabilizationDelay = defaultPrimaryStabilizationDelay

WScript.Echo "Setting the primary stabilization delay to " _

& defaultPrimaryStabilizationDelay & " minutes (the default) ..."

End If

isaArray.Save

WScript.Echo "Done!"

End Sub

Sub Usage()

WScript.Echo "Usage:" & VbCrLf _

& " " & WScript.ScriptName & " CCS UserName Domain Password " _

& "Action [NewValue]" & VbCrLf _

& "" & VbCrLf _

& " CCS - Configuration Storage Server for the array" & VbCrLf _

& " UserName - User name of an ISA Server administrator" & VbCrLf _

& " Domain - Domain of the user specified in UserName" & VbCrLf _

& " Password - Password of the user specified in UserName" & VbCrLf _

& " Action:" & VbCrLf _

& " P - Set the polling time" & VbCrLf _

& " F - Set the fallback delay" & VbCrLf _

& " T - Set the primary testing delay" & VbCrLf _

& " S - Set the primary stabilization delay" & VbCrLf _

& " D - Reset all delays to their default values" & VbCrLf _

& " NewValue - New property value (required for P, F, T, or S)"

WScript.Quit

End Sub

Additional Information

Additional ISA Server 2004 documents are available on the ISA Server 2004 Guidance page.