Book Image

PowerShell for SQL Server Essentials

By : Donabel Santos
Book Image

PowerShell for SQL Server Essentials

By: Donabel Santos

Overview of this book

Table of Contents (15 chapters)
PowerShell for SQL Server Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Implementing Reusability with Functions and Modules
Index

Scheduling PowerShell scripts


Many of the examples covered in this chapter can be run ad hoc. However, to enable more continuous monitoring, you will need to schedule these scripts to run regularly. You can use a number of options for scheduling. You can take advantage of SQL Server Agent and you can create a job that uses either a PowerShell step or an Operating System (CmdExec) step. Alternatively, you can use Windows Task Scheduler or vendor-specific schedulers, if they are available to you.