3 The dbatools lab

Now that you’ve installed dbatools, it’s time to connect to a nonproduction SQL Server instance! If you don’t already have SQL Server installed, this chapter will help you set up a lab where you can safely explore dbatools’s features and commands. This will allow you to test examples and labs from this book without worrying about causing any harm along the way.

Do not test in production

You should always test scripts and commands in a nonproduction environment prior to running them in production. We follow this rule ourselves and always use a number of no-risk SQL Server instances to test our scripts.

The key to PowerShell is in its name: it’s powerful, and although dbatools has many safeguards in place, we recommend using ...

Get Learn dbatools in a Month of Lunches 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.