Installing dbachecks

dbachecks is a new open source module that allows the SQL Server community to crowdsource our checklists and easily test our environments 🤗 You can read more about it in our article introducing dbachecks – a new module from the dbatools team!


The requirements for this module are a bit different than dbatools. dbatools supports PowerShell v3 but dbachecks supports PowerShell v4 and v5x. This allows us to take advantage of the faster, cooler syntax changes that became available in PowerShell v4. In addition, we have dependencies such as Pester that require a higher version.

This module does not support PowerShell v6 (Core).  



While we only require v4, we recommend using PowerShell v5.1 which runs on a variety of Windows Platforms including Windows 7 SP1. PowerShell v5.1 is faster and more secure since it has superior logging capabilities. Note that you only need a higher version of PowerShell on the workstation or server where you’ll be performing your checks.

PowerShell is installed as part of the “Windows Management Framework” or WMF.

Install and Configure WMF 5.1


Access to PowerShell Gallery


Access to the PowerShell Gallery is required. Installing dbachecks will automatically install the required modules: dbatools, Pester and PSFramework.

For a step-by-step tutorial, check out walk-thru: installing modules from the powershell gallery.


If you are in a locked down environment, consider using an online workstation to save the required modules then copy them to the PowerShell paths of your final destination.

This will also save the required modules. Note that it will say “installing dependent package” but it’s not installing, just saving.


Additional Modules

Required modules are automatically installed when you execute Install-Module dbachecks. Note that, like dbatools, dbachecks does not require SMO or SQL Server Management Studio to be installed.


A majority of our checks use dbatools either for accessing local or remote Windows computers and SQL Servers.


dbachecks is basically one big Pester wrapper. Invoke-DbcCheck wraps Invoke-Pester and provides additional functionality for the SQL community, such as being able to specify -SqlServer and -ComputerName. You may notice, Pester calls them tests, but we refer to our tests as checks.


PSFramework, written by Friedrich Weinmann, provides easy Enterprise logging, messaging and configuration for PowerShell modules. We rely heavily on PSFramework both in dbatools (though have our custom version) and dbachecks.


SQL Server Agent

So you want to schedule checks using SQL Agent? Great idea! Remember that this module requires PowerShell version 4.0, which doesn’t always mesh with SQL Server’s PowerShell Job Step. To run dbachecks, we recommend you use CmdExec. You can read more at

If you do choose to use the PowerShell step, don’t forget to Set-Location somewhere outside of SQLSERVER:, otherwise, you’ll get errors similar to this




If you encounter any issues not described below, you can add an issue or join us in the #dbachecks channel on the SQL Server Community Slack.


Trouble updating Pester

Pester is built into Windows 10 and, in order to update it, needs to be “installed” once in a different way. If you encounter the error:

The required module ‘Pester’ is not loaded. Load the module or remove the module from ‘RequiredModules’

You will need to execute:


Random Pester error

I’m the only one that appears to have experienced this so far, but if you encounter the error Unable to find type [Pester.OutputTypes], simply Import-Module Pester and it’ll work.


Trouble importing

If you run a command from dbachecks and receive the following error:

The command was found in the module ‘dbachecks’, but the command could not be loaded. For more information, run ‘Import-Module dbachecks’

You likely need to update one of the required modules. In order to ensure dbachecks works as expected, we have a minimum version requirement for dbatools, Pester and PSFramework. To update, you can run

If this does not solve your issue, run Import-Module dbachecks manually.

Also, if dbachecks is loading properly and you just wanna update, you can use our built-in command Update-DbcRequiredModules or its easier to remember alias, Update-Dbachecks.


Read more

For more information about dbachecks, visit these links by dbachecks contributors!

- Chrissy

4 thoughts on “Installing dbachecks

  1. RP_SQL Reply


    Is it possible to send power BI report as e-mail. I tried but no luck.

  2. Pingback: Checking Availability Groups with dbachecks | SQL DBA with A Beard

Leave a Reply

Your email address will not be published. Required fields are marked *