2

Searching dbatools–#SQLNewBlogger

 2 years ago
source link: https://voiceofthedba.com/2021/12/22/searching-dbatools-sqlnewblogger/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK