The TargetServer object represents a Microsoft® SQL Server™ installation on which a SQL Server Agent job will execute.
A SQL Server Agent job has an execution target. With SQL Server version 7.0, the SQL Server Agent of one server can direct job execution on other servers running SQL Server within an organization. Servers can enlist in the domain specified by a master SQL Server Agent. When a server enlists in a domain, it becomes a target server for job execution managed by the master SQL Server Agent.
Any server installation on which SQL Server Agent is executing provides the local server installation as a valid target for job execution.
Target servers are defined only on a master SQL Server Agent, and the SQL-DMO TargetServers collection and each TargetServer object are populated only when SQL-DMO applications connect to a server running SQL Server identified as the master in a multiserver administration group.
With the TargetServer object, you can: