Get-VESPDocumentVersion

In this article

    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.

    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.

    Get-VESPDocumentVersionExample 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.

    Get-VESPDocumentVersionExample 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.

    Get-VESPDocumentVersionExample 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.

    Get-VESPDocumentVersionExample 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.

    Get-VESPDocumentVersionExample 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