Configuring Arrays

Each Forefront TMG server is associated with an FPCArray object that represents a Forefront TMG array and provides access to configuration settings for the Forefront TMG server. The FPCArray object is an element of an FPCArrays collection.

When multiple Forefront TMG servers are associated with the same FPCArray object, you can configure these servers at the same time through the array-level properties and methods of the FPCArray object. Forefront TMG arrays can be set up programmatically through individual FPCArray objects.

Note  In Forefront TMG Standard Edition or any standalone server deployment, there is only one FPCArray object, which is associated with only one Forefront TMG server.

In Forefront TMG Enterprise Edition, you can join multiple Forefront TMG servers to a standalone array, in which one of the Forefront TMG servers is designated as the array manager, or you can deploy an Enterprise Management Server (EMS) for managing multiple arrays and create multiple Forefront TMG arrays in the FPCArrays collection. In both cases, an array can embrace a set of servers that have a similar configuration and share various resources to increase efficiency. For example, servers in an array share cached Web pages, so that a client attached to one of the computers benefits from pages cached on all of them.

The FPCArrays collection can then be accessed through the Arrays property of the Forefront TMG root object (FPC).

The way in which an individual FPCArray object is retrieved depends on the components of Forefront TMG that are installed and running on the computer on which the code is being executed. For more information, see Retrieving an Array Object.

In the simplest cases, you can retrieve an individual FPCArray object after creating the root object by using either of two methods:

The GetContainingArray method of the root object retrieves the FPCArray object that represents the array associated with the current Forefront TMG server. The current Forefront TMG server is the computer that executes the code calling this method. You can quickly retrieve the FPCArray object for this array by using code similar to this:

Set root = CreateObject("FPC.Root")
Dim tmgArray
Set tmgArray = root.GetContainingArray()

The Item method of the FPCArrays collection retrieves an FPCArray object that you identify by index or name. Here is a VBScript example:

Set root = CreateObject("FPC.Root")
Dim tmgArray 
Set tmgArray = root.Arrays(1)

Alternatively, you can use a more sophisticated scripting approach to allow real-time selection of an array while the script is running. The following code automatically inserts the name of the current array in the input box. The user can also type the name of a different array. Leaving the input box empty is the equivalent of clicking Cancel.

Set root = CreateObject("FPC.Root")
Set arrays = root.Arrays
arrayName = InputBox("Please enter the array name, or press <ENTER> for the containing array:",,root.GetContainingArray.Name)
If arrayName = "" Then
    ' Cancel option
    Exit Sub
    On Error Resume Next
    Set tmgArray = arrays.Item(arrayName)
    If Err.Number <> 0 Then
        Wscript.Echo "The specified array was not found."
        Exit Sub
    End If
    On Error GoTo 0
End If

The FPCArray object has properties that provide access to other parts of the administration object model, a factor that can be useful when setting up a Forefront TMG server.

Related topics

Forefront TMG Array Examples



Build date: 7/12/2010

Community Additions