1 Before you begin


1.1 Why data professionals can’t afford to ignore PowerShell

Data is now one of the most valuable assets in the world, so data professionals need a broad set of skills and are expected to be able to accomplish a wide number of tasks, including the following and many more:

  • Build SQL Server instances
  • Develop extract, transform, and load (ETL) solutions
  • Ensure SQL Server instances are correctly configured
  • Monitor and respond to alerts
  • Troubleshoot performance and access issues
  • Perform OS and SQL upgrades
  • Deploy changes to schemas
  • Evaluate index usage and settings

In the process of performing our role, we interact with a ton of technologies: SQL Server, virtualization (Hyper-V or VMware), operating systems (Windows or Linux), containers, clusters (including Kubernetes clusters), networking, storage, Active Directory, certificates, and the cloud, to name a few.

In the majority of cases, we will be working with more than one SQL Server instance—sometimes two, sometimes 10,000 or more.

Although we can achieve pretty much everything via GUI consoles for any of those technologies, the following two problems come immediately to mind with this approach:

  • The amount of time wasted
  • The inconsistency of humans compared with machines

This is best explained with a story.

1.1.1 A SQL Server DBA first win with PowerShell

1.2 Automate it

1.3 What is dbatools?

1.4 Is this book for you?

1.5 How to use this book

1.5.1 The main chapters