One of the most popular questions any PowerShell expert would receive is how to install the most popular dbatools based on Powershell scripts?
Well, first of all, I was never a PowerShell fan, to begin with as I believed it as a totally different language to learn. I personally have very little time between my consulting engagement that I hardly have time to learn something new. I had earlier expressed the same to Rob Sewell (commonly known as DBA with Beard) during last SQLPASS. He mentioned that I must explore dbatools which enable users to use all the script goodness of PowerShell with absolutely no programming needed.
Honestly, using PowerShell without learning Powershell is something I would have never believed myself. However, when I started to use dbatools personally at my customer engagements, I started to believe that it is indeed a very handy tool and every single DBA must use it for automating their production routines.
Here is the list of the functions, which you can do with the help of dbatools. Pretty much you think of any DBA activities, you can do with the help of various commands available in the library.
The installation instructions are provided over here in detail. However, to illustrate how simple it is to install on your machine, I am going to write them again here.
First, open your PowerShell command window with Administrator rights (Right Click on Window and select run as an administrator).
Second, run the following command.
After this couple of times, you may have to give affirmative answers to the questions typing Y in the prompt. That’s it! You are done.
Reference: Pinal Dave (https://blog.sqlauthority.com)