This is an archive version of the document. To get the most up-to-date information, see the current version.

Get-VESPDocumentVersion

Short Description

Returns versions of SharePoint documents.

Applies to

Veeam Backup & Replication, Veeam Backup for Microsoft 365

Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Get-VESPDocumentVersion [-Document] <VESPDocument>  [<CommonParameters>]

Detailed Description

This cmdlet returns versions of SharePoint documents.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

Document

Specifies a SharePoint document. This cmdlet will return version of this SharePoint document.

Note: This parameter is available for restore from backups created by Veeam Backup for Microsoft 365 version 6.0 or later.

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

True

0

True (ByValue)

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Docs.

Output Object

The cmdlet returns the VESPDocumentVersion object that contains a version of the specified SharePoint document.

Examples

Example 1. Getting Version of SharePoint Document from Site [For Veeam Backup & Replication]

This example shows how to get a version of the reports.txt document from the Teams site.

$session = Get-VBRSharePointItemRestoreSession

$database = Get-VESPDatabase -Session $session -Name "WSS_Content.mdf"

$site = Get-VESPSite -Database $database -Name "Teams"

$document = Get-VESPDocument -Site $site -Query "reports.txt"

Get-VESPDocumentVersion -Document $document

Perform the following steps:

  1. Run the Get-VBRSharePointItemRestoreSession cmdlet. Save the result to the $session variable.
  2. Run the Get-VESPDatabase cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
  3. Run the Get-VESPSite cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $site variable.
  4. Run the Get-VESPDocument cmdlet. Set the $site variable as the Site parameter value. Specify the Query parameter value. Save the result to the $document variable.
  5. Run the Get-VESPDocumentVersion cmdlet. Set the $document variable as the Document parameter value.

Example 2. Getting Version of SharePoint Document from Document Library [For Veeam Backup & Replication]

This example shows how to get a version of the reports.txt document from the Regulations SharePoint document library.

$session = Get-VBRSharePointItemRestoreSession

$database = Get-VESPDatabase -Session $session -Name "WSS_Content.mdf"

$documentLibrary = Get-VESPDocumentLibrary -Database $database -Name "Regulations"

$document = Get-VESPDocument -DocumentLibrary $documentLibrary -Query "reports.txt"

Get-VESPDocumentVersion -Document $document

Perform the following steps:

  1. Run the Get-VBRSharePointItemRestoreSession cmdlet. Save the result to the $session variable.
  2. Run the Get-VESPDatabase cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
  3. Run the Get-VESPDocumentLibrary cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $documentLibrary variable.
  4. Run the Get-VESPDocument cmdlet. Set the $documentLibrary variable as the DocumentLibrary parameter value. Specify the Query parameter value. Save the result to the $document variable.
  5. Run the Get-VESPDocumentVersion cmdlet. Set the $document variable as the Document parameter value.

Example 3. Getting Version of SharePoint Document from Site [For Veeam Backup for Microsoft 365]

This example shows how to get a version of the reports.txt document from the Teams site.

$session = Get-VBOSharePointItemRestoreSession

$organization = Get-VESPOrganization -Session $session -Name "ABC"

$site = Get-VESPSite -Organization $organization -Name "Team Site"

$document = Get-VESPDocument -Site $site -Query "reports.txt"

Get-VESPDocumentVersion -Document $document

Perform the following steps:

  1. Run the Get-VBOSharePointItemRestoreSession cmdlet. Save the result to the $session variable.
  2. Run the Get-VESPOrganization cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $organization variable.
  1. Run the Get-VESPSite cmdlet. Set the $organization variable as the Organization parameter value. Specify the Name parameter value. Save the result to the $site variable.
  2. Run the Get-VESPDocument cmdlet. Set the $site variable as the Site parameter value. Specify the Query parameter value. Save the result to the $document variable.
  3. Run the Get-VESPDocumentVersion cmdlet. Set the $document variable as the Document parameter value.

Example 4. Getting Version of SharePoint Document from Document Library [For Veeam Backup for Microsoft 365]

This example shows how to get a version of the reports.txt document from the Regulations SharePoint document library.

$session = Get-VBOSharePointItemRestoreSession

$organization = Get-VESPOrganization -Session $session -Name "ABC"

$documentLibrary = Get-VESPDocumentLibrary -Organization $organization -Name "Regulations"

$document = Get-VESPDocument -DocumentLibrary $documentLibrary -Query "report.txt"

Get-VESPDocumentVersion -Document $document

Perform the following steps:

  1. Run the Get-VBOSharePointItemRestoreSession cmdlet. Save the result to the $session variable.
  2. Run the Get-VESPOrganization cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $organization variable.
  1. Run the Get-VESPDocumentLibrary cmdlet. Set the $organization variable as the Organization parameter value. Specify the Name parameter value. Save the result to the $documentLibrary variable.
  2. Run the Get-VESPDocument cmdlet. Set the $documentLibrary variable as the DocumentLibrary parameter value. Specify the Query parameter value. Save the result to the $document variable.
  3. Run the Get-VESPDocumentVersion cmdlet. Set the $document variable as the Document parameter value.

Example 5. Getting Version of SharePoint Document from Organization [For Veeam Backup for Microsoft 365]

This example shows how to get a version of the reports.txt document from the ABC SharePoint organization.

$session = Get-VBOSharePointItemRestoreSession

$organization = Get-VESPOrganization -Session $session -Name "ABC"

$document = Get-VESPDocument -Organization $organization -Query "report.txt"

Get-VESPDocumentVersion -Document $document

Perform the following steps:

  1. Run the Get-VBOSharePointItemRestoreSession cmdlet. Save the result to the $session variable.
  2. Run the Get-VESPOrganization cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $organization variable.
  3. Run the Get-VESPDocument cmdlet. Set the $organization variable as the Organization parameter value. Specify the Query parameter value. Save the result to the $document variable.
  4. Run the Get-VESPDocumentVersion cmdlet. Set the $document variable as the Document parameter value.

Related Commands