A Sandcastle Documented Class Library

# 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 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    bool SetServerGroup(
    	string serverName,
    	long? serverGroupId
    )

    Function SetServerGroup (
    	serverName As String,
    	serverGroupId As Long?
    ) As Boolean

    bool SetServerGroup(
    	String^ serverName,
    	Nullable<long long> serverGroupId
    )

    abstract SetServerGroup :
            serverName : string *
            serverGroupId : Nullable<int64> -> bool

#### Parameters

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

#### Return Value

Type: Boolean
if the server already belongs to the specified group; otherwise,
.
Exceptions

Exception | Condition
--- | ---
ArgumentException | serverName is empty or .
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.
NotFoundException | The specified server group does not exist.
NoPrivilegeException | The caller does not have system administration privileges.
InvalidSessionException | The caller context is not associated with a valid session.

Remarks
The server will be automatically registered if it is not already.
See Also

#### Reference

IServerRegistryService Interface
Dundas.BI.Configuration Namespace