Why I love dbatools

I’ve been working on the dbatools project for a while now and I felt like telling you why I love this project.

A little background about me, I’m not a full-time programmer. I learned to program with Java years ago and did little personal projects with PHP, C#, and a couple of other languages. I started PowerShell about 7 years ago and thought I was capable of delivering solid code. That all changed with dbatools.

Being part of the team

So for the last year, I’ve been part of the project, from debugging code, adding new features to existing functions, and adding new functions.

A world opened up when I first joined the project. I had no idea I would be learning this much in such a short time.
I had to deal with GIT, QA, advanced modules, styling, Pester, etc.

So my first command was a little command Find-DbaOrphanedFile. One time Chrissy LeMaire asked if someone could make a function to find orphaned files of databases. I jumped in because I knew this was something I could do and I didn’t have the chance yet to help out with the project.

In about two weeks I had the function done as far as I knew. It did the job and now I wanted to present my awesome code to other developers.

My first challenge was to get to deal with GIT. I had never used GIT and the only source control my company had at the time was Visual SourceSafe. Don’t judge me! I wasn’t the one that decided to use an out-of-date piece of software. Of course, when you do things the first time you’re going to fail and I failed big time.

I made a branch from the wrong fork, committed stuff but didn’t synchronize it, created a pull request (PR) in the wrong branch, and more. I did everything wrong you could do wrong and still Chrissy was nice as always trying to help me to get everything on track.

After the GIT hurdle, I finally submitted the PR and after about a day I got a kind but long comment back from one of the members that did the QA.

Before I started, I read some of the standards the project put in place but as a developer, you want to get started and as a result, I forgot some of them. The funny thing was though that I learned more about PowerShell, modules, functions, standards, etc in that one comment than I had done in the last 4 years.

What struck me was the way the members dealt with the people like me who weren’t familiar with a more professional way of development. The members understand that by reacting the wrong way, I would’ve quit helping out with the project because it would be too overwhelming.

That’s one of the strengths of the project, to embrace everyone that wants to help out. Find a way to make everyone a functional member of the team either a developer, QA, writing articles, etc. That made me more enthusiastic about the project and I started to contribute more. Now I’ve become one of the major contributors.

In the last year, I learned more about PowerShell than I did in my history of doing PowerShell.
I’ve become more precise when it comes to my code, I meticulously go over my tests and try to keep my coding standards. I looked back at some code I’d written over the years and imagined that some crazed-out monkey with a brain fart high on crack made it.
Now I go through all the code I’ve written over the years and redo everything that’s no longer up to my new standards.

Being a user of the module

The other reason I love dbatools is that it has made my life so much easier.

I see myself as one of the lazy DBAs that would rather spend a couple of hours automating his work than have to do the same thing over and over again.

The project has about 200 different functions and it’s close to releasing version 1.0. This is big deal due to a lot of standardizing, testing, and new functions that are going to get released. With that amount of functionality in one single module, there is bound to be a solution for you in there to make it easier to do your work.

Nowadays I test my backups every day using the Test-DbaLastBackup function. I see the status of all my backups on all my database servers within seconds. I retrieve information about many servers without having to go through each one of them.

And migration has been a blast. If you aren’t excited about the project yet, please visit the website and look at what has already been accomplished.

Go see all the commands and then decide if it’s worth implementing in your daily work. If you’re wondering if a command is there that could help you out, the command index can help you find more information.

This is still in beta though but we’re working on getting the information in there.

Thank you!

I want to thank the dbatools team for making me feel welcome and boosting my knowledge to a point that it has made a significant impact on the way I do things in my daily life.

I also want to thank all the contributors that put in all the effort to get the project where it is today. Without all the people putting in their valuable time this wouldn’t have worked.