2 Installing dbatools

 

In this chapter, we’ll cover minimum requirements, various installation methods and gotchas. Understanding how to install dbatools will not only enable you to use our toolset, it will also enable you to install any other PowerShell module in the PowerShell Gallery.

There’s an old saying "before you do anything, you have to do something first" and the same is true for installing dbatools and other PowerShell modules. Specifically, there are two commands that you may have to execute first:

  • Set-ExecutionPolicy
  • Set-PSRepository

If you have not yet modified your default Execution Policy, or trusted Microsoft’s PowerShell Gallery using Set-PSRepository, we’ll help guide you through these steps. If you are already familiar with the PowerShell Gallery and installing dbatools, feel free to skip to the next chapter.

2.1 Minimum Requirements

We’re going to start with minimum requirements because not everyone can be on the latest and greatest at work. It’s useful to know if the old workstation we inherited at work can support dbatools. The good news is that the answer is most likely yes!

dbatools originally started as a migration module, so it was created with requirements that are as low as possible. This allows dbatools to be used in older environments that are most in need of migrations. Because of PowerShell’s flexibility, dbatools also works in newer environments such as Azure, SQL Server on Linux, and PowerShell on macOS.

2.1.1 Server

2.1.2 Workstation

2.1.3 Ports

2.1.4 Execution Policy

2.2 Signed software

2.3 Understanding installation paths

2.4 Installation methods

2.5.1 Downloading zipped archive

2.5.2 Additional Methods

2.6 How to find and use commands, use the help system and docs.dbatools.io

2.6.1 Get-Command

2.6.2 Find-DbaCommand

2.6.3 Get-Help

2.6.4 docs.dbatools.io

2.7 Updating

sitemap