TargetServerGroup.RemoveMemberServer Method

Withdraws membership of the referenced target server group from the specified target server.

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

Syntax

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

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

Parameters

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

Examples

Scheduling Automatic Administrative Tasks in SQL Server Agent

See Also

Reference

TargetServerGroup Class

Microsoft.SqlServer.Management.Smo.Agent Namespace

Other Resources

Automated Administration Tasks (SQL Server Agent)

sp_delete_targetservergroup (Transact-SQL)