Microsoft Internet Security and Acceleration Server 2004 SDK

Managing Collections

A collection is an object that holds many individual objects of the same type. Usually, the name of the collection will be the plural of the name of the individual object types within the collection; for example, the FPCNetworkRules collection holds FPCNetworkRule objects.

Collections allow you to quickly assign settings to multiple objects of the same type with a script. For example, a collection is used to hold the policy rules, in the form of FPCPolicyRule objects. You can easily make changes to the rules in a collection with a simple script. See Collection Methods and Properties, for specific method and property information.

ISA Server administration object collections do not support nested For Each loops on the same collection object. For example, the following nested loops will not work because both loops operate on the same collection object:

For Each Rule1 in Array.ArrayPolicy.PolicyRules
	For Each Rule2 in Array.ArrayPolicy.PolicyRules
		MsgBox Rule1.Name & Rule2.Name
	Next
Next

The following pair of nested For Each loops will work because each loop applies to a different collection object:

For Each Array in Arrays
	For Each Rule in Array.ArrayPolicy.PolicyRules
		MsgBox Rule.Name
	Next
Next