ConnectToConfigurationStorageServer
Method of the IFPCEE Interface
The ConnectToConfigurationStorageServer
method connects to the specified Configuration Storage
server.
[C++]
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
);
Parameters
- ConfigurationStorageServer
- BSTR that specifies the name of the Configuration
Storage server. The default value is an empty BSTR, which
indicates the local computer.
- StorageUserName
- 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.
- StorageUserDomain
- 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.
- StorageUserPassword
- 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.
- MonitoringUserName
- 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.
- MonitoringUserDomain
- 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.
- MonitoringUserPassword
- 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.
Return Value
This method returns S_OK if the call is successful; otherwise,
it returns an error code.
[Visual Basic]
Syntax
Sub 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
- String value that specifies the name of the Configuration
Storage server. The default value is an empty string, which
indicates the local computer.
- StorageUserName
- 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
- 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
- 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
- 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
- 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
- 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
This method has no return values. If the call is unsuccessful,
an error is raised that can be intercepted by using an error
handler.
Example Code
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
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.
By default, every Forefront TMG computer with the Microsoft
Firewall service installed is also a Configuration Storage
server, and the ConnectToConfigurationStorageServer
method can be used to connect to it from a remote management
computer.
Requirements
Client |
Requires Windows Vista or Windows XP. |
Server |
Requires Windows Server 2008. |
Version |
Requires Forefront Threat Management Gateway (TMG). |
IDL |
Declared in Msfpccom.idl.
|
DLL |
Requires Msfpccom.dll.
|
See Also
FPC
Send comments
about this topic to Microsoft
Build
date: 11/30/2009
© 2008 Microsoft Corporation. All rights reserved.