Dbatools is a great PowerShell module that has 106 ways to help ease the administrative burden faced by SQL Server DBA’s and developers. As a IT Consultant that handles Microsoft Dynamics products that install within SQL Server, I would suggest that this is a great module for us to know and use too.
For those that may not know what PowerShell is, it was developed by Microsoft for task automation and configuration management. You can learn more about PowerShell at Microsoft Virtual Academy
How to Install
There are four ways to install dbatools module into PowerShell. The PowerShell command that I used was:
Invoke-Expression (Invoke-WebRequest -UseBasicParsing https://dbatools.io/in)
The complete instructions on how to install the module can be found on dbatool’s download page: https://dbatools.io/download/
There are several scenarios to use dbatools. The developer’s goal with every command is to support:
- SQL Server 2000 – 2016
- Express – Datacenter Edition
- Clustered and stand-alone instances
- Windows and SQL authentication
- Default and named instances
- Multiple instances on one server
You can learn more about dbatools and the Functions associated with the PowerShell module here: https://dbatools.io/getting-started/
Functions to Know for Dynamics
As IT Consultant in the Microsoft Dynamics space, we are sometimes tasked with setting up SQL Server and/or migrating the Dynamics databases to the client’s new SQL Server. Some of the key functions I have used in the past to do this are:
Best Practice Commands
General Administration Commands
A complete list of the 106 Functions contained in the current version, 0.8.693. Can be viewed here, https://dbatools.io/functions/, and just follow the link for each Function on that page to get the details on that Functions use.
Until next time, I hope this helps you with your SQL Server Administration and database migrations.