Each Forefront TMG computer is associated with an FPCArray object that represents a Forefront TMG array and provides access to configuration settings for the Forefront TMG computer. The FPCArray object is an element of an FPCArrays collection.
When multiple Forefront TMG computers 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 Medium Business Edition, there is only one FPCArray object, which is associated with only one Forefront TMG computer.
When multiple Forefront TMG arrays are created in the FPCArrays collection, each 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 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 computer. The current Forefront TMG computer 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 Else 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 computer.
Send comments about this topic to Microsoft
Build date: 11/30/2009
© 2008 Microsoft Corporation. All rights reserved.