Summary

We covered a few examples of how you could monitor and automate SQL Server tasks in this chapter. Albeit small, this knowledge should open up a world of possibilities for you when you decide to monitor and automate using PowerShell. These are a few items you could consider monitoring: backup jobs, database connectivity, service pack installations, schema changes, and tracking suspicious logins.

PowerShell would also be great with administrative tasks, such as exporting information to files and managing files (deleting or archiving files older than x number of days for instance).

Remember, however, that PowerShell is still just another tool. There may be better or worse tool options for what you are trying to accomplish. Just make sure that ...

Get PowerShell for SQL Server Essentials 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.