20 Creating and working with SQL Server Agent objects

In the previous chapter, you learned how to filter and retrieve information about a SQL Server Agent. The responsibility of DBAs for a SQL Server Agent includes the creation and alteration of SQL Server Agent objects. This chapter will provide you with all of the tools to do this easily.

Now that you are learning how useful and powerful dbatools is, you will also want to know how to schedule the running of dbatools scripts with SQL Server Agent jobs, and we will show you the most stable and robust method that we use to do this.

20.1 SQL Server Agent job creation

In the previous chapter, you used Find-DbaCommand to find all of the dbatools commands that interact with the Agent. Let’s search ...

Get Learn dbatools in a Month of Lunches now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.