---
title: "Get-DbaInstanceList"
description: "Returns the user-maintained list of SQL Server instances used for tab completion."
url: "https://dbatools.io/Get-DbaInstanceList/"
availability: "Windows, Linux, macOS"
tags: ["TabCompletion", "Autocomplete"]
author: "the dbatools team + Claude"
source: "https://github.com/dataplat/dbatools/blob/master/public/Get-DbaInstanceList.ps1"
last_updated: "2024-01-01"
---

# Get-DbaInstanceList

## Synopsis

Returns the user-maintained list of SQL Server instances used for tab completion.

## Description

Returns all SQL Server instance names from the user-maintained list that is pre-loaded  
into the dbatools tab completion cache for the -SqlInstance parameter. This list allows  
users to have their frequently used instances available for autocomplete in their  
PowerShell terminal without needing to connect to them first.  
  
Use Add-DbaInstanceList to add instances to the list and Remove-DbaInstanceList to  
remove them.  
  
Instances can also be pre-loaded at module import time by setting the  
$env:DBATOOLS_KNOWN_INSTANCES environment variable to a comma-separated list of instance  
names in your PowerShell profile.

## Syntax

```powershell
Get-DbaInstanceList
    [<CommonParameters>]

```

## Examples

### Example 1: Returns all instance names from the user-maintained autocomplete list

```powershell
PS C:\> Get-DbaInstanceList
```

### Example 2: Removes all instances from the user-maintained autocomplete list

```powershell
PS C:\> Get-DbaInstanceList | Remove-DbaInstanceList
```

## Outputs

**System.String**

Returns instance names as strings. Each instance name in the user-maintained autocomplete list is returned as a separate string object.

---

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