12 Days of dbatools – First Day1 min read

powershell logo3

On the first day of Christmas dbatools gave to me: Find-DbaCommand

Command Information:

Let’s start the festivities off with a way to get familiar with the over 500 commands that dbatools provides us.  It can be a daunting task to import the module and then start scrolling through the functions directory to find what you think you are looking for.

That is where the Find-DbaCommand command comes in very handy.  It allows you to find a dbatools command related to a keyword you might be looking for.  Say you are looking for commands related to Agent Jobs or Memory, you can just execute Find-DbaCommand and it will look through all of the public commands and return a list of the commands related to the keyword you used.

 Command Description:

Finds dbatools commands searching through the inline help text, building a consolidated json index and querying it because Get-Help is too slow

Command Example:

To find all the commands that relate to “CPU” you can use the simple example above.  The pattern parameter will search the command help for reference to your keyword.

Advanced Command Usage:

To add a little extra to the command, you can pass your results from Find-DbaCommand to Out-Gridview so you can a graphical list of the results.  Then you can select the command that interests you and click Ok and then PowerShell will return the Get-Help for that command.


One Reply to “12 Days of dbatools – First Day1 min read

Leave a Reply

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