Get-AgentJobHistory
Gets job history.
Syntax
Get-AgentJobHistory [-jobserver] <Object> [[-jobHistoryFilter] <JobHistoryFilter>] [<CommonParameters>]
Detailed Description
The Get-AgentJobHistory function gets Job History for the specified server. Filtering can be applied by using the Set-AgentJobHistoryFilter function.
Related Commands
Parameters
Name |
Description |
Required? |
Pipeline Input |
Default Value |
jobserver |
|
true |
false |
|
jobHistoryFilter |
|
false |
false |
|
Input Type
None
You cannot pipe objects to Get-AgentJobHistory
Return Values
System.Data.DataRow
Get-AgentJobHistory returns a System.Data.DataRow
Examples
EXAMPLE 1
Get-AgentJobHistory "Z002\sql2k8" $(Set-AgentJobHistoryFilter -outcome 'Failed')
This command gets the job history for all failed jobs for SQL Server Z002\SQL2K8.