Get-AgentTargetServer

Gets an TargetServer object or collection of TargetServer objects.

Syntax

Get-AgentTargetServer [-jobserver] <Object> [[-name] <String>] [<CommonParameters>]

Detailed Description

The Get-AgentTargetServer function gets an TargetServer object or a collection of TargetServer objects for the specified server.

Related Commands

* Get-AgentTargetServer

Parameters

Name Description Required? Pipeline Input Default Value
jobserver    true  false   
name    false  false   

Input Type

None You cannot pipe objects to Get-AgentTargetServer

Return Values

Microsoft.SqlServer.Management.Smo.Agent.TargetServer Get-AgentTargetServer returns a Microsoft.SqlServer.Management.Smo.Agent.TargetServer object.

Examples

EXAMPLE 1

Get-AgentTargetServer "Z002\sql2K8"
This command gets a collection of TargetServer objects for SQL Server Z002\SQL2K8.