Summary

After looking at the basics of PowerShell and exploring a few ways to get some interesting information about servers, this chapter reviewed a script to provide information about each server you manage. Then it examined some of the structures in SQL Server Management Objects (SMO) and some scripts to perform basic administrative tasks. This chapter also looked at a couple scripts to extract data from SQL Server because that's a common request from business people. Finally, this chapter took a quick look at the features in SQL Server 2012 to make PowerShell an integral part of the SQL Server toolset.

Much more can be explored with PowerShell, but this provides a starting point. Automation enables administrators to do more in less time and provide more value to the companies that employ them. PowerShell is a powerful way to automate almost everything an administrator needs to do with SQL Server.

Get Microsoft SQL Server 2012 Bible now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.