Help Center
Choose product document...
Veeam Backup for Microsoft Office 365 2.0
PowerShell Reference

Get-VESPDocument

Short Description

Returns SharePoint documents.

Syntax

This cmdlet provides 3 parameter sets:

  • For getting documents from a specified site:

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

  • For getting documents from a specified document library:

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

  • For getting children of a specified SharePoint document item:

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

Detailed Description

This cmdlet returns SharePoint documents.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Organization

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

True

0

True (ByValue)

False

DocumentLibrary

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

True

0

True (ByValue)

False

Query

Allows to use keywords for item search. The cmdlet will return items that match the search query from the specified folder, database or mailbox.

False

Named

False

False

Recurse

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

False

Named

False

False

ParentDocument

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

True

0

True (ByValue)

False

Site

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

True

0

True (ByValue)

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

This example shows how to get a document with a name "document.txt" from a site with a name "Team Site".

  1. Run Get-VBOSharePointItemRestoreSession to get the active restore session. Save the result to the $session variable.
  2. Run Get-VESPOrganization with the $session variable to get the organization with a name "ABC". Save the result to the $organization variable.
  3. Run Get-VESPSite with the $organization variable and 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 a "document.txt" value for a Query parameter to get a SharePoint document with a name "document.txt".

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 "document.txt"

Example 2

This example shows how to get a document with a name "document.txt" from a specific database with a name "content.mdf".

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

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

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

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

Example 3

This example shows how to get a document with a name "document.txt" from a specific document library with a name "Test Document Library".

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

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 "Test Document Library"

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

Example 4

This example shows how to get children documents for a document with a name "document.txt".

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

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 "Test Document Library"

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

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

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference