Share via


TargetServerGroup.AddMemberServer Method

Assigns target server group membership to the specified target server.

Namespace:  Microsoft.SqlServer.Management.Smo.Agent
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Sub AddMemberServer ( _
    srvname As String _
)
'Usage
Dim instance As TargetServerGroup
Dim srvname As String

instance.AddMemberServer(srvname)
public void AddMemberServer(
    string srvname
)
public:
void AddMemberServer(
    String^ srvname
)
member AddMemberServer : 
        srvname:string -> unit 
public function AddMemberServer(
    srvname : String
)

Parameters

  • srvname
    Type: System.String
    A String value that specifies the target server to be removed from the target server group.

Remarks

Use the AddMemberServer and RemoveMemberServer methods to configure multi-server administration target server groups. A target server can be a member of no group or a member of multiple groups.