Open this page in the API Guide

IServerRegistryService.SetServerGroup Method

Sets the server group of the specified server.

Namespace:  Dundas.BI.Configuration
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (25.1.0.1000)
Syntax
bool SetServerGroup(
	string serverName,
	long? serverGroupId
)

Parameters

serverName
Type: System.String
The name of the server.
serverGroupId
Type: System.Nullable<Int64>
The ID of the server group, or null to leave the server unassigned to any server group.

Return Value

Type: Boolean
false if the server already belongs to the specified group; otherwise, true.
Exceptions
ExceptionCondition
ArgumentExceptionserverName is empty or null.
ArgumentOutOfRangeException

The specified server does not exist and the specified name is longer than MaxNameLength characters.

-or-

serverGroupId is less than or equal to zero.

NotFoundExceptionThe specified server group does not exist.
NoPrivilegeExceptionThe caller does not have system administration privileges.
InvalidSessionExceptionThe caller context is not associated with a valid session.
Remarks
The server will be automatically registered if it is not already.
See Also