---
title: "Find-DbaCommand"
description: "Finds dbatools commands searching through the inline help text"
url: "https://dbatools.io/Find-DbaCommand/"
availability: "Windows, Linux, macOS"
tags: ["Module", "Lookup"]
author: "Simone Bizzotto (@niphlod)"
source: "https://github.com/dataplat/dbatools/blob/master/public/Find-DbaCommand.ps1"
last_updated: "2024-01-01"
---

# 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

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

```

## Examples

### Example 1: For lazy typers: finds all commands searching the entire help for &quot;snapshot&quot;

```powershell
PS C:\> Find-DbaCommand "snapshot"
```

### Example 2: For rigorous typers: finds all commands searching the entire help for &quot;snapshot&quot;

```powershell
PS C:\> Find-DbaCommand -Pattern "snapshot"
```

### Example 3: Finds all commands tagged with &quot;Job&quot;

```powershell
PS C:\> Find-DbaCommand -Tag Job
```

### Example 4: Finds all commands tagged with BOTH &quot;Job&quot; and &quot;Owner&quot;

```powershell
PS C:\> Find-DbaCommand -Tag Job,Owner
```

### Example 5: Finds every command whose author contains our beloved &quot;Chrissy&quot;

```powershell
PS C:\> Find-DbaCommand -Author Chrissy
```

### Example 6: Finds every command whose author contains our beloved &quot;Chrissy&quot; and it tagged as &quot;AG&quot;

```powershell
PS C:\> Find-DbaCommand -Author Chrissy -Tag AG
```

### Example 7: Finds all commands searching the entire help for &quot;snapshot&quot;, rebuilding the index (good for developers)

```powershell
PS C:\> Find-DbaCommand -Pattern snapshot -Rebuild
```

### Optional Parameters

##### -Pattern

Searches all help text properties (synopsis, description, examples, parameters) for the specified text pattern using wildcard matching.  
Use this for broad searches when you know a concept or term but aren't sure which specific commands handle it.

| Property | Value |
| --- | --- |
| Alias |  |
| Required | False |
| Pipeline | false |
| Default Value |  |

##### -Tag

Filters results to show only commands that contain all specified tags. Tags categorize commands by SQL Server feature area like "Backup", "AG", "Job", or "Security".  
Use this when you need to find commands related to specific SQL Server functionality. Multiple tags require commands to have ALL specified tags.

| Property | Value |
| --- | --- |
| Alias |  |
| Required | False |
| Pipeline | false |
| Default Value |  |

##### -Author

Filters results to show commands created by authors whose name contains the specified text. Uses wildcard matching so partial names work.  
Useful when you want to find commands written by a specific contributor or when following up on recommendations from particular experts.

| Property | Value |
| --- | --- |
| Alias |  |
| Required | False |
| Pipeline | false |
| Default Value |  |

##### -MinimumVersion

Filters results to show only commands that require the specified minimum version of dbatools or higher.  
Use this to ensure compatibility when working with older dbatools installations or when checking what features require recent updates.

| Property | Value |
| --- | --- |
| Alias |  |
| Required | False |
| Pipeline | false |
| Default Value |  |

##### -MaximumVersion

Filters results to show only commands that work with the specified maximum version of dbatools or lower.  
Helpful when working with legacy environments where you need to avoid commands that require newer dbatools versions.

| Property | Value |
| --- | --- |
| Alias |  |
| Required | False |
| Pipeline | false |
| Default Value |  |

##### -Rebuild

Forces a complete rebuild of the dbatools command index from the current module state. This rescans all help text and updates the cached index file.  
Use this when developing new commands, after updating dbatools, or when search results seem outdated or incomplete.

| Property | Value |
| --- | --- |
| 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.

| Property | Value |
| --- | --- |
| Alias |  |
| Required | False |
| Pipeline | false |
| Default Value | False |

##### -WhatIf

Displays what would happen if the command is run

| Property | Value |
| --- | --- |
| Alias | wi |
| Required | False |
| Pipeline | false |
| Default Value |  |

##### -Confirm

Confirms overwrite of index

| Property | Value |
| --- | --- |
| Alias | cf |
| Required | False |
| Pipeline | false |
| Default Value |  |

## Outputs

**PSCustomObject**

Returns one object per dbatools command matching the specified filters.

**Default display properties (via Select-DefaultView):**

- CommandName: The name of the dbatools command
- Synopsis: A brief one-line description of what the command does

**Additional properties available (use Select-Object * to see all):**

- Name: The full name of the command function
- Availability: Platform availability (Windows, Linux, macOS or Windows only)
- Alias: Comma-separated list of command aliases
- Description: Detailed description of the command's functionality
- Examples: Full examples section from the command's help text
- Links: Related documentation links
- Syntax: Complete syntax information for the command
- Tags: Array of tags categorizing the command by feature area (Backup, AG, Job, Security, etc.)
- Author: Name(s) of the command author(s)
- MinimumVersion: Minimum dbatools version required to use this command
- MaximumVersion: Maximum dbatools version supported by this command
- Params: Array of parameter information (name, description, aliases, required status, pipeline support, default values, accepted values)
All properties from the full command help index are accessible. Use Select-Object * to display all available properties for further analysis.

---

Part of [dbatools](https://dbatools.io/), a free and open source PowerShell module for SQL Server administration. Full command index: https://dbatools.io/commands/
