Freigeben über


AddManagementGroup Method

Applies To: System Center 2012 - Operations Manager

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

This method adds a new, but inactive, management group to the agent.

ManagementServiceConfigurationClass.AddManagementGroup (managementGroupName, managementServerName, managementServerPort, actionAccountDomain,actionAccountUser,actionAccountPassword)

Parameters

Parameter Type Description

managementGroupName

String

The name of the management group to be added.

managementServerName

String

The fully qualified domain name (FQDN) of the primary management server for the management group.

managementServerPort

Int

The port to use on the management server.

actionAccountDomain

String

Optional. If this parameter is present, this is the domain of the default action account user.

actionAccountUser

String

Optional. If this parameter is present, this is the user name of the default action account user.

actionAccountPassword

String

Optional. If this parameter is present, this is the password of the default action account user.

  • managementGroupName
    The managementGroupName must be unique, and it must contain between 1 and 50 alphanumeric characters. It must not contain any leading or trailing spaces.
  • managementServerName
    The managmentServerName must be a valid Domain Name System (DNS) FQDN. The value will not be validated for DNS name resolution.
  • managementServerPort
    In general, the default port of 5723 should be used. The value must be in the range from 0 through 65535.
  • actionAccountDomain
    If actionAccountDomain is Nothing and actionAccountUser is not Nothing, actionAccountUser should either be in user principal name (UPN) format, if it is the domain user, or be passed as LocalSystem, if it is the local account of the computer. If actionAccountUser is Nothing, this parameter must also be Nothing.
  • actionAccountUser
    If actionAccountUser is in the UPN format, actionAccountDomain will be ignored. If actionAccountUser is Nothing, LocalSystem will be used as the default action account, and both the actionAccountDomain and actionAccountPassword must also be Nothing.
  • actionAccountPassword
    If actionAccountPassword is Nothing and actionAccountUser is not Nothing, the password for the account will be treated as the empty string.

Return Value

None.

Errors

Error number Description

0x80004003

A required parameter has a value of Nothing.

0x80070057

A parameter is outside the valid range.

0x800700B7

The management group already exists.

0x80070005

There are insufficient permissions to add a management group. The caller of this method must be an administrator.

Remarks

When the method returns, the management group is registered but it is not yet active with the agent. To activate the management group, either call ReloadConfiguration Method or restart the System Center Management Service.

On failure of this method, the existing settings of the agent will not be modified on Windows Vista and Windows 7. On Windows Server 2003, the method will attempt to either make all modifications or no modifications. However, in some cases this may not be possible. In these cases, RemoveManagementGroup Method should be called to clean up the failed add.

Example

For a scripting example, see How to Add and Remove a Management Group

Requirements

Platforms: Requires Windows Vista, Windows Server 2003, or Windows Server 2008

Version: Requires System Center 2012 – Operations Manager

See Also

Reference

GetManagementGroup Method
GetManagementGroups Method
RemoveManagementGroup Method
ManagementServiceConfigurationClass Object