--- title: "Get-VEPSQLTablespace" description: "Returns tablespaces for a backed-up PostgreSQL instance. Product: Veeam Backup & Replication Product Edition: Enterprise, Enterprise Plus, Veeam Universal License This cmdlet returns an array of tablespaces for a backed-up PostgreSQL instance." canonical: "https://helpcenter.veeam.com/docs/vbr/explorers_powershell/get-vepsqltablespace.html" breadcrumb: "Veeam Explorers PowerShell Reference > Veeam Explorers PowerShell Reference > Veeam Explorer for PostgreSQL > Get-VEPSQLTablespace" dateModified: "2026-08-18" --- # Get-VEPSQLTablespace ## Short Description Returns tablespaces for a backed-up PostgreSQL instance. **Product**: Veeam Backup & Replication **Product Edition**: Enterprise, Enterprise Plus, Veeam Universal License ## Syntax ``` Get-VEPSQLTablespace [-Instance] [] ``` ## Detailed Description This cmdlet returns an array of tablespaces for a backed-up PostgreSQL instance. ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Instance

Specifies a PostgreSQL instance. The cmdlet will return an array of tablespaces for the specified instance.

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

VEPSQLInstance

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 [`VEPSQLTableSpace`](vepsqltablespace.md)`[]` array that contains tablespaces for the specified instance. ## Examples ::: example ### Getting Tablespaces of PostgreSQL Instance This example shows how to get an array of tablespaces for a backed-up PostgreSQL instance. ``` $session = Get-VEPSQLRestoreSession $instance = Get-VEPSQLInstance -Session $session[0] -DataDirectory /var/lib/pgsql/13/data Get-VEPSQLTablespace -Instance $instance ``` Perform the following steps: 1. Run the [`Get-VEPSQLRestoreSession`](get-vepsqlrestoresession.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-VEPSQLInstance`](get-vepsqlinstance.md) cmdlet. Set the `$session` variable as the `Session` parameter value. Specify the `DataDirectory` parameter value. Save the result to the `$instance` variable. 3. Run the `Get-VEPSQLTablespace` cmdlet. Set the `$instance` variable as the `Instance` parameter value. ::: ## Related Commands - [`Get-VEPSQLRestoreSession`](get-vepsqlrestoresession.md) - [`Get-VEPSQLInstance`](get-vepsqlinstance.md)