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 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.
To set the polling time, fallback delay, primary testing delay, or primary stabilization delay
To reset the values of all four properties to their default values
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