IFPCEE::ConnectToConfigurationStorageServer method
Applies to: desktop apps only
The ConnectToConfigurationStorageServer method connects to the specified Configuration Storage server.
Syntax
HRESULT ConnectToConfigurationStorageServer(
[in, optional] BSTR ConfigurationStorageServer,
[in, optional] BSTR StorageUserName,
[in, optional] BSTR StorageUserDomain,
[in, optional] BSTR StorageUserPassword,
[in, optional] BSTR MonitoringUserName,
[in, optional] BSTR MonitoringUserDomain,
[in, optional] BSTR MonitoringUserPassword
);
FPC.ConnectToConfigurationStorageServer( _
[ ByVal ConfigurationStorageServer As String ], _
[ ByVal StorageUserName As String ], _
[ ByVal StorageUserDomain As String ], _
[ ByVal StorageUserPassword As String ], _
[ ByVal MonitoringUserName As String ], _
[ ByVal MonitoringUserDomain As String ], _
[ ByVal MonitoringUserPassword As String ] _
)
Parameters
ConfigurationStorageServer [in, optional]
C++ BSTR that specifies the name of the Configuration Storage server. The default value is an empty BSTR, which indicates the local computer. VB String value that specifies the name of the Configuration Storage server. The default value is an empty string, which indicates the local computer. StorageUserName [in, optional]
C++ BSTR that specifies the name of a user with the permissions needed to modify the stored configuration. The default value is an empty BSTR, which specifies the user who is currently logged on. VB String value that specifies the name of a user with the permissions needed to modify the stored configuration. The default value is an empty string, which specifies the user who is currently logged on. StorageUserDomain [in, optional]
C++ BSTR that specifies the name of the domain of the user with the permissions needed to modify the stored configuration. The default value is an empty BSTR, which specifies the domain of the user who is currently logged on. VB String value that specifies the name of the domain of the user with the permissions needed to modify the stored configuration. The default value is an empty string, which specifies the domain of the user who is currently logged on. StorageUserPassword [in, optional]
C++ BSTR that specifies the password of the user with the permissions needed to modify the stored configuration. The default value is an empty BSTR, which specifies the password provided by the user who is currently logged on. VB String value that specifies the password of the user with the permissions needed to modify the stored configuration. The default value is an empty string, which specifies the password provided by the user who is currently logged on. MonitoringUserName [in, optional]
C++ BSTR that specifies the name of a user with the permissions needed to read the stored configuration. The default value is an empty BSTR, which specifies the user who is currently logged on. VB String value that specifies the name of a user with the permissions needed to read the stored configuration. The default value is an empty string, which specifies the user who is currently logged on. MonitoringUserDomain [in, optional]
C++ BSTR that specifies the name of the domain of the user with the permissions needed to read the stored configuration. The default value is an empty BSTR, which specifies the domain of the user who is currently logged on. VB String value that specifies the name of the domain of the user with the permissions needed to read the stored configuration. The default value is an empty string, which specifies the domain of the user who is currently logged on. MonitoringUserPassword [in, optional]
C++ BSTR that specifies the password of the user with the permissions needed to read the stored configuration. The default value is an empty BSTR, which specifies the password provided by the user who is currently logged on. VB String value that specifies the password of the user with the permissions needed to read the stored configuration. The default value is an empty string, which specifies the password provided by the user who is currently logged on.
Return value
C++
This method returns S_OK if the call is successful; otherwise, it returns an error code.
VB
This method has no return values. If the call is unsuccessful, an error is raised that can be intercepted by using an error handler.
Remarks
If user credentials are not supplied, the credentials of the user who is currently logged on are used.
After a connection to a Configuration Storage server is established and configuration changes are made, you should not call the DisconnectFromConfigurationStorageServer method and then the ConnectToConfigurationStorageServer or ConnectToConfigServerPort method to establish a new connection before saving the changes made using the current connection.
A computer on which Forefront TMG Management is installed without the Microsoft Firewall service can serve as a remote management computer and can create an instance of the root (FPC) object. However, that computer cannot access the properties of the root object or any other object in the administration COM object hierarchy until it connects to a Configuration Storage server using this method or the ConnectToConfigServerPort method.
The following types of Forefront TMG computers are Configuration Storage servers, and the ConnectToConfigurationStorageServer method can be used to connect to them from a remote management computer.
- A standalone server.
- An array manager in a standalone array.
- An Enterprise Management Server (EMS).
Examples
When run on a remote Forefront TMG computer, this VBScript subprocedure receives the name of a Configuration Storage server in the parameter passed to it, connects to the specified Configuration Storage server using the credentials of the user who is currently logged on, retrieves and displays the names of the existing arrays, and disconnects. This example does not include complete error handling.
Sub ConnectToCSS(cssName)
' Create the root object.
Dim root ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
' Declare the other objects needed.
Dim tmgArrays ' An FPCArrays collection
Dim tmgArray ' An FPCArray object
' Connect to the Configuration Storage server.
root.ConnectToConfigurationStorageServer cssName
' Display the name of each array in the enterprise.
Set tmgArrays = root.Arrays
For Each tmgArray In tmgArrays
WScript.Echo tmgArray.Name
Next
' Disconnect from the Configuration Storage server.
root.DisconnectFromConfigurationStorageServer
End Sub
Requirements
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only) |
Version |
Forefront Threat Management Gateway (TMG) 2010 |
IDL |
Msfpccom.idl |
DLL |
Msfpccom.dll |
See also
Build date: 7/12/2010