Summary

In this chapter, we covered different ways to work with PowerShell with SQL Server using PowerShell. The approach you will take will depend on the version of SQL Server and PowerShell that is available in your environment. Loading the SQLPS module is the current de facto way to go to load SQL Server-specific modules and providers. If you need more programmatic access and flexibility, SMO can take you a long way.

In the next chapter, we will cover how to profile and configure SQL Server using PowerShell.

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.