Help Center
Choose product document...
Veeam Backup & Replication 9.5 Update 4
Veeam Explorers PowerShell Reference

Get-VESPDocument

Short Description

Returns SharePoint documents.

Applies to

Product Edition: Community, Standard, Enterprise, Enterprise Plus

Syntax

This cmdlet provides the following parameter sets.

  • To get documents from a specified SharePoint site:

Get-VESPDocument [-Site] <VESPSite> [-Query <string>]  [<CommonParameters>]

  • To get documents from a specified SharePoint document library:

Get-VESPDocument [-DocumentLibrary] <VESPDocumentLibrary> [-Query <string>] [-Recurse]  [<CommonParameters>]

  • To get children of a specified SharePoint document item:

Get-VESPDocument [-ParentDocument] <VESPDocument> [-Query <String>] [-Recurse [<SwitchParameter>]  [<CommonParameters>]

  • To get documents from a specified SharePoint organization:

Get-VESPDocument [-Organization] <VESPOrganization[]> [-Query <string>]  [<CommonParameters>]

  • To get documents from a specified SharePoint database:

Get-VESPDocument [-Database] <VESPDatabase[]> [-Query <string>]  [<CommonParameters>]

Detailed Description

This cmdlet returns SharePoint documents.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Site

Specifies a SharePoint site. This cmdlet will return SharePoint documents from a specified SharePoint site.

True

0

True (ByValue)

False

DocumentLibrary

Specifies a document library. This cmdlet will return SharePoint documents from the specified document library.

True

0

True (ByValue)

False

ParentDocument

Specifies a parent document in a mailbox. The cmdlet will return child documents of this parent document.

True

0

True (ByValue)

False

Organization

Specifies an organization. The cmdlet will return a document library from this organization.

True

0

True (ByValue)

False

Database

Specifies a name of the SharePoint database. This cmdlet will return SharePoint documents from the specified database.

NOTE: This parameter is available for SahrePoint databases backed up by means of Veeam Backup & Replication.

True

0

True (ByValue)

False

Query

Allows using keywords for item search. The cmdlet will return items that match the search query from the specified database, site, list or item.

False

Named

False

False

Recurse

Indicates that the cmdlet will return the specified parent document and all of its children.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Example 1

[For Veeam Backup for Microsoft Office 365] This example shows how to get the reports.txt document from the Teams site.

  1. Run Get-VBOSharePointItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VESPOrganization with the $session variable to get the ABC organization. Save the result to the $organization variable.
  3. Run Get-VESPSite with the $organization variable and the Name parameter to get the specific site from the organization. Save the result to the $site variable.
  4. Run Get-VESPDocument with the $site variable and the reports.txt value for the Query parameter to get the reports.txt SharePoint document.

PS C:\PS> $session = Get-VBOSharePointItemRestoreSession

PS C:\PS> $organization = Get-VESPOrganization -Session $session -Name "ABC"

PS C:\PS> $site = Get-VESPSite -Organization $organization -Name "Team Site"

PS C:\PS> Get-VESPDocument -Site $site -Query "reports.txt"

Example 2

[For Veeam Backup for Microsoft Office 365] This example shows how to get the reports.txt document from the content.mdf database.

  1. Run Get-VBOSharePointItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VESPOrganization with the $session variable to get the ABC organization. Save the result to the $organization variable.
  3. Run Get-VESPDocument with the $organization variable and the reports.txt value for the Query parameter to get the reports.txt SharePoint document.

PS C:\PS> $session = Get-VBOSharePointItemRestoreSession

PS C:\PS> $organization = Get-VESPOrganization -Session $session -Name "ABC"

PS C:\PS> Get-VESPDocument -Organization $organization -Query "report.txt"

Example 3

[For Veeam Backup for Microsoft Office 365] This example shows how to get the report.txt document from the Regulations document library.

  1. Run Get-VBOSharePointItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VESPOrganization with the $session variable to get the ABC organization. Save the result to the $organization variable.
  3. Run Get-VESPDocumentLibrary with the $organization variable and the Name parameter to get the report.txt SharePoint document library. Save the result to the $documentLibrary variable.
  4. Run Get-VESPDocument with the $documentLibrary variable and the report.txt value for the Query parameter to get the report.txt SharePoint document.

PS C:\PS> $session = Get-VBOSharePointItemRestoreSession

PS C:\PS> $organization = Get-VESPOrganization -Session $session -Name "ABC"

PS C:\PS> $documentLibrary = Get-VESPDocumentLibrary -Organization $organization -Name "Regulations"

PS C:\PS> Get-VESPDocument -DocumentLibrary $documentLibrary -Query "report.txt"

Example 4

[For Veeam Backup for Microsoft Office 365] This example shows how to get children documents for the reports.txt document.

  1. Run Get-VBOSharePointItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VESPOrganization with the $session variable to get the ABC organization. Save the result to the $organization variable.
  3. Run Get-VESPDocument with the $organization variable and the Query parameter to get the reports.txt SharePoint document. Save the result to the $parentDocument variable.
  4. Run Get-VESPDocument with the $parentDocument variable and the Recurse parameter to get the children of the reports.txt SharePoint document.

PS C:\PS> $session = Get-VBOSharePointItemRestoreSession

PS C:\PS> $organization = Get-VESPOrganization -Session $session -Name "ABC"

PS C:\PS> $documentLibrary = Get-VESPDocumentLibrary -Organization $organization -Name "Documents"

PS C:\PS> $parentDocument = Get-VESPDocument -DocumentLibrary $documentLibrary -Query "reports.txt"

PS C:\PS> Get-VESPDocument -ParentDocument $parentDocument -Recurse

Example 5

[For Veeam Backup & Replication] This example shows how to get all SharePoint documents from the WSS_Content.mdf SharePoint database.

  1. Run Get-VBRSharePointItemRestoreSession to get a Microsoft SharePoint restore session. Save the result to the $session variable.
  2. Run Get-VESPDatabase with the $session variable and the Name parameter to get the WSS_Content.mdf SharePoint database. Save the result to the $database variable.
  3. Run Get-VESPDocument with the $database variable to get all SharePoint documents from the WSS_Content.mdf SharePoint database.

PS C:\PS> $session = Get-VBRSharePointItemRestoreSession

PS C:\PS> Get-VESPDatabase -Session $session -Name "WSS_Content.mdf"

PS C:\PS> Get-VESPDocument -Database $database

Example 6

[For Veeam Backup & Replication] This example shows how to get the reports.txt document from the Teams site.

  1. Run Get-VBRSharePointItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VESPDatabase with the $session variable to get the WSS_Content.mdf database. Save the result to the $database variable.
  3. Run Get-VESPSite with the $database variable and the Name parameter to get the Teams site from the SharePoint database. Save the result to the $site variable.
  4. Run Get-VESPDocument with the $site variable and the reports.txt value for the Query parameter to get the reports.txt SharePoint document.

PS C:\PS> $session = Get-VBRSharePointItemRestoreSession

PS C:\PS> $database = Get-VESPDatabase -Session $session -Name "WSS_Content.mdf"

PS C:\PS> $site = Get-VESPSite -Database $database -Name "Teams"

PS C:\PS> Get-VESPDocument -Site $site -Query "reports.txt"

Example 7

[For Veeam Backup & Replication] This example shows how to get a document with a name reports.txt from the Regulations SharePoint document library.

  1. Run Get-VBRSharePointItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VESPDatabase with the $session variable to get the WSS_Content.mdf database. Save the result to the $database variable.
  3. Run Get-VESPDocumentLibrary with the $database variable and the Name parameter to get the Regulations SharePoint document library. Save the result to the $documentLibrary variable.
  4. Run Get-VESPDocument with the $documentLibrary variable and the reports.txt value for the Query parameter to get the reports.txt SharePoint document.

PS C:\PS> $session = Get-VBRSharePointItemRestoreSession

PS C:\PS> $database = Get-VESPDatabase -Session $session -Name "WSS_Content.mdf"

PS C:\PS> $documentLibrary = Get-VESPDocumentLibrary -Database $database -Name "Regulations"

PS C:\PS> Get-VESPDocument -DocumentLibrary $documentLibrary -Query "reports.txt"

Example 8

[For Veeam Backup & Replication] This example shows how to get children documents for the reports.txt SharePoint document.

  1. Run Get-VBRSharePointItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VESPDatabase with the $session variable and the Name parameter to get the WSS_Content.mdf database. Save the result to the $database variable.
  3. Run Get-VESPDocumentLibrary with the $database variable and the Query parameter to get the Regulations SharePoint document library. Save the result to the $documentLibrary variable.
  4. Run Get-VESPDocument with the $documentLibrary variable and the Query parameter to get the reports.txt SharePoint document. Save the result to the $parentDocument variable.
  5. Run Get-VESPDocument with the $parentDocument variable and the Recurse parameter to get the children of the reports.txt SharePoint document.

PS C:\PS> $session = Get-VBRSharePointItemRestoreSession

PS C:\PS> $database = Get-VESPdatabase -Session $session -Name "WSS_Content.mdf"

PS C:\PS> $documentLibrary = Get-VESPDocumentLibrary -Database $database -Name "Regulations"

PS C:\PS> $parentDocument = Get-VESPDocument -DocumentLibrary $documentLibrary -Query "reports.txt"

PS C:\PS> Get-VESPDocument -ParentDocument $parentDocument -Recurse

Related Commands

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions

Veeam Availability for Nutanix AHV

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation