Get a List of SQL Server Agent Jobs

sql server

I've got an extensive selection of these to add to a spreadsheet and don't want to go through by hand.
What it the T-SQL command(s) to generate a list of SQL Server Agent Jobs?

Best Answer

On each server, you can query the sysjobs table in the msdb. For instance:

SELECT job_id, [name] FROM msdb.dbo.sysjobs;