Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.
I learned something new about dbatools. That’s using the Find-DbaCommand cmdlet, which is handier than Get-Command. I’ll show you why in this post.
Searching PowerShell
You can search for commands with Get-Command. If I search for “key” in the dbatools module, I’d run this:
Get-Command *key* -Module dbatools
This returns me a number of items. In fact, it returns 11 items.
That’s not bad, and this is how I’ve often been looking for command when I’m coding. This is faster than going to the index page on the site.
Find-DbaCommand
I was reading the upcoming dbatools in a Month of Lunches, and saw the Find-DbaCommand listed. If I use this, and include “key”, I get different results.
This might be more than I want, but I thought this was a neat addition to the dbatools module to help someone find commands quickly.
It is definitely easier than going to dbatools.io and trying to search for a command in the command list.
SQLNewBlogger
I learned something, and I sketched out how to explain it to someone. I took 5 minutes to knock this post together. You could do the same thing, but expand on a way that you actually use this to find a command.
Might teach someone how a skill. Might even teach someone that wants to interview you.