Welcome to Day 24 of my “A Month of PowerShell” series. This series will use the series landing page on this blog at //blog.waynesheffield.com/wayne/a-month-of-powershell/. Please refer to this page to see all of the posts in this series, and to quickly go to them.

One of the best practices that you should observe is to run regular integrity checks on our databases. This is best performed by running as a job, so let’s make a job that runs every Saturday at 3am to run DBCC CHECKDB on all of our databases.

Creating Jobs, Job Steps and Job Schedules

Yesterday we created operators for the alerts. If you want an operator for the job, you go about creating one in the same manner as we did yesterday, and in the job class set the appropriate operator properties prior to creating the job.