IOvRemoteAgent::BecomePrimMgr
Inform the agents on the specified systems to change the HPOM
primary manager to the calling HPOM for Windows management
server.
-
- HRESULT BecomePrimMgr(
- [out] VARIANT* pvarErrors,
[in] VARIANT varNodePrimNames,
[in] VARIANT varNodeIds,
[in] VARIANT varNodeGroupPaths,
[in] VARIANT varNodeGroupIds,
[in, optional, defaultvalue(0)] VARIANT_BOOL bInclSubGroups,
[in, optional, defaultvalue(0)] long nSubAgentId,
[out, retval] BSTR* pbstrStatus
);
Parameters
-
- pvarErrors
- When synchronous administration completes successfully on all
nodes, VARIANT_TRUE is returned in this parameter. Otherwise,
VARIANT_FALSE is returned.
- varNodePrimNames
- String or array of strings containing primary node names. To
find data on specified nodes, members of varNodePrimNames are
matched with whatever was entered as the PrimaryNodeName property
of the OV_ManagedNode WMI instance.
If an exact match cannot be found, the behavior is as follows:
If a node is specified without a domain, it is compared with a
short name (until the first '.') in all OV_ManagedNode WMI
instances that have entered FQDN as a Primary Node Name. Otherwise,
if a node is specified with FQDN, a short name (until the first
'.') is compared with an exact match (also a short name) in
OV_ManagedNode WMI instances.
If more than one matching OV_ManagedNode WMI instance is found,
an error is reported.
- varNodeIds
- String or array of strings containing node IDs (names). To find
data on specified nodes, members of varNodeIds are matched with
whatever was entered as the Name property of the OV_ManagedNode WMI
instance.
- varNodeGroupPaths
- String or array of strings containing a full node group path,
as shown in the console tree, starting under the nodes. The path
must begin with a backslash ("\"). All node groups within the path
must begin with a backslash ("\").
Node groups in the path are identified with the node group
caption (that is, the Caption property of the OV_NodeGroup WMI
instance).
- varNodeGroupIds
- String or array of strings containing the node group IDs
(names). Node groups are identified with whatever was entered in
the Name property of the OV_NodeGroup WMI instance.
- bInclSubGroups
- Optional parameter. VARIANT_TRUE includes the nodes of all
subgroups of the specified node groups (parameters
varNodeGroupPaths and varNodeGroupIds). VARIANT_FALSE (default)
does not enumerate subgroups.
- nSubAgentId
- Optional parameter. ID of the subagent on which to perform the
remote administration. Default is 0 (all subagents).
Returning Parameter
-
- pbstrStatus
- When synchronous administration started successfully, and is
completed on all nodes, the status is returned.
HRESULT Return Values
-
- S_OK
- Synchronous administration started successfully.
- (FAILED)
- An error occurred. The synchronous operation could not be
started. IErrorInfo was created. A detailed error description is
traced.
Description
With the BecomePrimMgr method, the calling HPOM for Windows
management server becomes the HPOM primary manager on specified
systems. The HPOM primary manager can be set separately for each
subagent by the specified subagent ID with the parameter
nSubAgentId. The default is 0 (all subagents).
Nodes are specified with some or all of the following
parameters:
- varNodePrimNames
- varNodeIds
- varNodeGroupPaths
- varNodeGroupIds
If any parameter is not used, it should be passed to the method
as an empty Variant.
Even when the node is included in more than one parameter,
remote administration is performed only once.
To also include all subgroups of the specified node group, call
the method with the parameter bInclSubGroups set to VARIANT_TRUE.
It defaults to VARIANT_FALSE (subgroups will not be
enumerated).
To specify all managed nodes, specify a string with a single
backslash character ("\") as a parameter varNodeGroupPaths, leave
the parameters varNodePrimNames, varNodeIds, and varNodeGroupIds
empty, and set the parameter bInclSubGroups to VARIANT_TRUE.
This is a synchronous method. For a comparison of the
synchronous and asynchronous methods, see the description of the
IOvRemoteAgent interface.