dbatools is a free PowerShell module with over 180 SQL Server administration, best practice and migration commands included.


Get-DbaAgentJobOutputFile

This function returns for one or more SQL Instances the output file value for each step of one or many agent job with the Job Names provided dynamically. It will not return anything if there is no Output File.

Screenshots

Examples

This will return the paths to the output files for each of the job step of the The Agent Job Job on the SERVERNAME instance

Get-DbaAgentJobOutputFile -SqlServer SERVERNAME -Jobs ‘The Agent Job’

This will return the paths to the output files for each of the job step of all the Agent Jobs on the SERVERNAME instance

Get-DbaAgentJobOutputFile -SqlServer SERVERNAME

This will return the paths to the output files for each of the job step of the The Agent Job Job on the SERVERNAME instance and SERVERNAME2

Get-DbaAgentJobOutputFile -SqlServer SERVERNAME,SERVERNAME2 -Jobs ‘The Agent Job’

Author

This command was created by Rob Sewell. You can find Rob on Twitter and his blog.

Get-Help

From PowerShell, execute Get-Help Get-DbaAgentJobOutputFile -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaAgentJobOutputFile.ps1 on GitHub
 

Related commands