---
title: "Get-DbatoolsPath"
description: "Retrieves configured file paths used by dbatools functions for storing temporary files, logs, and output data."
url: "https://dbatools.io/Get-DbatoolsPath/"
availability: "Windows, Linux, macOS"
source: "https://github.com/dataplat/dbatools/blob/master/public/Get-DbatoolsPath.ps1"
last_updated: "2024-01-01"
---

# Get-DbatoolsPath

## Synopsis

Retrieves configured file paths used by dbatools functions for storing temporary files, logs, and output data.

## Description

Retrieves file paths that have been configured for use by dbatools functions. These paths define where the module stores temporary files, exports, logs, and other data during SQL Server operations. DBAs can customize these paths to control where dbatools writes files, ensuring compliance with organizational file storage policies and avoiding permission issues.  
  
Paths can be configured using Set-DbatoolsPath or directly through the configuration system by creating settings with the format "Path.Managed.<PathName>". Common predefined paths include Temp, LocalAppData, AppData, and ProgramData, but custom paths can be defined for specific workflows like backup file staging or export destinations.

## Syntax

```powershell
Get-DbatoolsPath
    [-Name] <String>
    [<CommonParameters>]

```

## Examples

### Example 1: Returns the temp path

```powershell
PS C:\> Get-DbatoolsPath -Name 'temp'
```

### Required Parameters

##### -Name

Specifies the name of the configured path to retrieve. Common predefined paths include 'Temp' for temporary file operations, 'LocalAppData' for user-specific application data, 'AppData' for roaming   
profile data, and 'ProgramData' for system-wide application data.  
Use this when you need to determine where dbatools will write files for export operations, temporary processing, or when configuring custom paths for specific workflows like backup staging   
directories or report output locations.  
Custom path names can be defined using Set-DbatoolsPath and referenced here for consistent file management across your SQL Server administration scripts.

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

## Outputs

**System.String**

Returns the configured file path as a string. The returned path represents the location where dbatools will store files for the specified path name (Temp, LocalAppData, AppData, ProgramData, or custom-defined path). Returns $null if the specified path name is not configured.

---

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