Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IFPCArray::SelectNetworkTemplateAndPolicy[C++] | FPCArray.SelectNetworkTemplateAndPolicy [Visual Basic]

Internet Security and Acceleration Server 2004/2006 SDK

The SelectNetworkTemplateAndPolicy method sets a selected network template and default policy for the array.


HRESULT SelectNetworkTemplateAndPolicy(
  BSTR networkTemplate,
  BSTR defaultPolicy );

Parameters

networkTemplate
[in] String value that specifies the name of the network template to be used. This parameter must be set to the value held in the Name property of an FPCNetworkTemplate object that is defined in the array.
defaultPolicy
[in] String value that specifies the name of the default firewall policy to be used. This parameter must be set to the value held in the Name property of an FPCPolicyInTemplate object that is included in the collection of policies held in the PoliciesInTemplate property of the FPCNetworkTemplate object specified in the networkTemplate parameter.

Return Values

This method returns S_OK if the call is successful; otherwise, it returns an error code.

Remarks

This method sets the NetworkTemplateUsed property of the array.

This method deletes all existing networks, network rules, and policy rules (except system policy rules), and replaces them with the network topology and rules defined by the network template and default policy selected.

We recommend that you export your ISA Server configuration before calling this method.

The SelectNetworkTemplateAndPolicy method sets a selected network template and default policy for the array.


Sub SelectNetworkTemplateAndPolicy( _
  ByVal networkTemplate As String, _
  ByVal defaultPolicy As String _
)

Parameters

networkTemplate
[in] String value that specifies the name of the network template to be used. This parameter must be set to the value held in the Name property of an FPCNetworkTemplate object that is defined in the array.
defaultPolicy
[in] String value that specifies the name of the default firewall policy to be used. This parameter must be set to the value held in the Name property of an FPCPolicyInTemplate object that is included in the collection of policies held in the PoliciesInTemplate property of the FPCNetworkTemplate object specified in the networkTemplate parameter.

Return Values

This method does not return a value.

Remarks

This method sets the NetworkTemplateUsed property of the array.

This method deletes all existing networks, network rules, and policy rules (except system policy rules), and replaces them with the network topology and rules defined by the network template and default policy selected.

We recommend that you export your ISA Server configuration before calling this method.

Example Code

This VBScript script applies a network template and a default firewall policy. Note that the Save method does not need to be called to apply the changes.
 ' Specify the names of a network template
' and a default firewall policy as constants.
Const TemplateName = "Edge Firewall"
Const PolicyName = "Block all"

' Declare the other objects needed.
Dim root       ' An FPC object
Dim isaArray   ' An FPCArray object

' Create the root obect.
Set root = CreateObject("FPC.Root")

' Get a reference to the array object.
Set isaArray = root.GetContainingArray()

' Apply the specified network template and default firewall policy.
isaArray.SelectNetworkTemplateAndPolicy TemplateName, PolicyName

WScript.echo "The network template " & _ 
isaArray.NetworkTemplateUsed.Name & " was applied."

Requirements

Client Requires Windows XP.
Server Requires Windows Server 2003. Requires Windows Server 2003 or Windows 2000 for ISA Server 2004 Standard Edition.
Version Requires Internet Security and Acceleration (ISA) Server 2006 or ISA Server 2004.
IDL

Declared in Msfpccom.idl.

DLL Requires Msfpccom.dll.

See Also

FPCArray

Show:
© 2015 Microsoft