--- title: "Get-VESQLDatabaseFile" description: "Returns full file names for a backed-up Microsoft SQL Server database. Product: Veeam Backup & Replication Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License This cmdlet returns an array of full file names " canonical: "https://helpcenter.veeam.com/docs/vbr/explorers_powershell/get-vesqldatabasefile.html" breadcrumb: "Veeam Explorers PowerShell Reference > Veeam Explorers PowerShell Reference > Veeam Explorer for Microsoft SQL Server > Get-VESQLDatabaseFile" dateModified: "2026-08-18" --- # Get-VESQLDatabaseFile ## Short Description Returns full file names for a backed-up Microsoft SQL Server database. **Product**: Veeam Backup & Replication **Product Edition**: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License ## Syntax ``` Get-VESQLDatabaseFile [-Database] [] ``` ## Detailed Description This cmdlet returns an array of full file names for a Microsoft SQL Server database. ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Database

Specifies a Microsoft SQL Server database. The cmdlet will return an array of full file names for the specified database.

Accepts the VESQLDatabase object. To get this object, run the Get-VESQLDatabase cmdlet.

VESQLDatabase

True

0

True (ByValue)

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the [About Common Parameters](http://go.microsoft.com/fwlink/p/?LinkID=113216) section of Microsoft Docs. ## Output Object The cmdlet returns the [`VESQLDatabaseFile`](vesqldatabasefile.md)`[]` array that contains full file names for the backed-up Microsoft SQL Server database. ## Examples ::: example ### Getting List of Full File Names for Backed-Up Microsoft SQL Server Database This example shows how to get a list of full file names for a backed-up Microsoft SQL Server database. ``` $session = Get-VESQLRestoreSession $database = Get-VESQLDatabase -Session $session[0] -Name "db1" Get-VESQLDatabaseFile -Database $database ``` Perform the following steps: 1. Run the [`Get-VESQLRestoreSession`](get-vesqlrestoresession.md) cmdlet. Save the result to the `$session` variable. The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore session (in this example, it is the first restore session in the array). 2. Run the [`Get-VESQLDatabase`](get-vesqldatabase.md) cmdlet. Set the `$session` variable as the `Session` parameter value and select the necessary restore session. Specify the `Name` parameter value. Save the result to the `$database` variable. 3. Run the `Get-VESQLDatabaseFile` cmdlet. Set the `$database` variable as the `Database` parameter value. ::: ## Related Commands - [`Get-VESQLRestoreSession`](get-vesqlrestoresession.md) - [`Get-VESQLDatabase`](get-vesqldatabase.md)