commands

^

Find-DbaCommand

Author Simone Bizzotto (@niphlod)
Availability Windows, Linux, macOS

 

Want to see the source code for this command? Check out Find-DbaCommand on GitHub.
Want to see the Bill Of Health for this command? Check out Find-DbaCommand.

Synopsis

Finds dbatools commands searching through the inline help text

Description

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

Syntax

Find-DbaCommand
    [[-Pattern] <String>]
    [[-Tag] <String[]>]
    [[-Author] <String>]
    [[-MinimumVersion] <String>]
    [[-MaximumVersion] <String>]
    [-Rebuild]
    [-EnableException]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Find-DbaCommand "snapshot"

For lazy typers: finds all commands searching the entire help for "snapshot"

Example: 2
PS C:\> Find-DbaCommand -Pattern "snapshot"

For rigorous typers: finds all commands searching the entire help for "snapshot"

Example: 3
PS C:\> Find-DbaCommand -Tag Job

Finds all commands tagged with "Job"

Example: 4
PS C:\> Find-DbaCommand -Tag Job,Owner

Finds all commands tagged with BOTH "Job" and "Owner"

Example: 5
PS C:\> Find-DbaCommand -Author Chrissy

Finds every command whose author contains our beloved "Chrissy"

Example: 6
PS C:\> Find-DbaCommand -Author Chrissy -Tag AG

Finds every command whose author contains our beloved "Chrissy" and it tagged as "AG"

Example: 7
PS C:\> Find-DbaCommand -Pattern snapshot -Rebuild

Finds all commands searching the entire help for "snapshot", rebuilding the index (good for developers)

Optional Parameters

-Pattern

Searches help for all commands in dbatools for the specified pattern and displays all results

Alias
Required False
Pipeline false
Default Value
-Tag

Finds all commands tagged with this auto-populated tag

Alias
Required False
Pipeline false
Default Value
-Author

Finds all commands tagged with this author

Alias
Required False
Pipeline false
Default Value
-MinimumVersion

Finds all commands tagged with this auto-populated minimum version

Alias
Required False
Pipeline false
Default Value
-MaximumVersion

Finds all commands tagged with this auto-populated maximum version

Alias
Required False
Pipeline false
Default Value
-Rebuild

Rebuilds the index

Alias
Required False
Pipeline false
Default Value False
-EnableException

By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.

Alias
Required False
Pipeline false
Default Value False
-WhatIf

Displays what would happen if the command is run

Alias wi
Required False
Pipeline false
Default Value
-Confirm

Confirms overwrite of index

Alias cf
Required False
Pipeline false
Default Value