What this book covers
Chapter 1, Getting Started with PowerShell, introduces you to PowerShell and its importance in server management and automation. This chapter is a good starting point for readers who are new to PowerShell and want to get started with its environment and other components.
Chapter 2, Using PowerShell with SQL Server, dives into using SQL Server-specific PowerShell support in different operating systems and SQL Server versions. You will learn about SQL Server-specific modules, cmdlets, and SQL Management Objects (SMO).
Chapter 3, Profiling and Configuring SQL Server, covers how to quickly profile SQL Server and change SQL Server configurations using PowerShell. You will learn more about Get-WmiObject and the SMO Server object.
Chapter 4, Basic SQL Server Administration, covers the tasks in a DBA's checklist. These tasks include getting space/memory usage, backup/restore, enabling features, jobs, alerts, and so on.
Chapter 5, Querying SQL Server with PowerShell, shows the methods to query SQL Server from within PowerShell, its pros and cons, and how to export results.
Chapter 6, Monitoring and Automating SQL Server, teaches you how to perform SQL Server usage and performance monitoring, logging, alerting, and error checking using PowerShell.
Appendix, Implementing Reusability with Functions and Modules, shows some snippets required to accomplish the task at hand. It covers the basics of creating and deploying functions and modules.