Save-VESPItem

In this article

    Short Description

    Saves SharePoint items.

    Applies to Veeam Backup for Microsoft Office 365, Veeam Backup & Replication

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

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • Save a SharePoint document library:

    Save-VESPItem [-DocumentLibrary] <VESPDocumentLibrary> [-Path] <string> [-AsZip] [-Force]  [<CommonParameters>]

    • Save a specific SharePoint document:

    Save-VESPItem [-Document] <VESPDocument[]> [-Path] <string> [-AsZip] [-Force]  [<CommonParameters>]

    • Save a SharePoint attached item:

    Save-VESPItem [-ItemAttachment] <VESPItemAttachment[]> [-Path] <string> [-AsZip] [-Force]  [<CommonParameters>]

    Detailed Description

    This cmdlet saves SharePoint items such as document libraries, documents and attached items.

    Parameters

    Parameter

    Description

    Type

    Required

    Position

    Accept Pipeline Input

    Document

    Specifies SharePoint document that you want to save.

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

    True

    0

    True (ByValue)

    DocumentLibrary

    Specifies SharePoint document library that you want to save.

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

    True

    0

    True (ByValue)

    ItemAttachment

    Specifies SharePoint item attachment that you want to save.

    Accepts the VESPItemAttachment[]object. To get this object, run the Get-VESPItemAttachment cmdlet.

    True

    0

    True (ByValue)

    AsZip

    Defines that the cmdlet will save the specified item as a ZIP archive.

    SwitchParameter

    False

    Named

    False

    Path

    Specifies a path to the specified item.

    String

    True

    1

    False

    Force

    Defines that the cmdlet will create a folder in the specified directory.

    SwitchParameter

    True

    0

    True (ByValue)

    <CommonParameters>

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

    Examples

    Save-VESPItemExample 1. Saving SharePoint Document Library [For Veeam Backup & Replication]

    This example shows how to save the Regulations document library to the C:\save path.

    $session = Get-VBRSharePointItemRestoreSession

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

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

    Save-VESPItem -DocumentLibrary $documentLibrary -Path "C:\save"

    Perform the following steps:

    1. Get the SharePoint document library:
    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.
    1. Run the Save-VESPItem cmdlet. Set the $documentLibrary variable as the DocumentLibrary parameter value. Specify the Path parameter value.

    Save-VESPItemExample 2. Saving SharePoint Document [For Veeam Backup & Replication]

    This example shows how to save the reports.txt document to the C:\save path.

    $session = Get-VBRSharePointItemRestoreSession

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

    $document = Get-VESPDocument -Database $database -Query "reports.txt"

    Save-VESPItem -Document $document -Path "C:\save"

    Perform the following steps:

    1. Get the SharePoint document.
    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-VESPDocument cmdlet. Set the $database variable as the Database parameter value. Specify the Query parameter value. Save the result to the $document variable.
    1. Run the Save-VESPItem cmdlet. Set the $document variable as the Document parameter value. Specify the Path parameter value.

    Save-VESPItemExample 3. Saving SharePoint Item Attachement [For Veeam Backup & Replication]

    This example shows how to save attachments for the Documents item to the C:\save path..

    $session = Get-VBRSharePointItemRestoreSession

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

    $item = Get-VESPItem -Database $database -Query "Reports"

    $attachment = Get-VESPItemAttachment -Item $item

    Save-VESPItem -ItemAttachment $attachment -Path "C:\save"

    Perform the following steps:

    1. Get the SharePoint item:
    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-VESPItem cmdlet. Set the $database variable as the Database parameter value. Specify the Query parameter value. Save the result to the $item variable.
    4. Run the Get-VESPItemAttachment cmdlet. Set the $item variable as the Item parameter value. Save the result to the $attachment variable.
    1. Run the Get-VESPItemAttachment cmdlet. Set the $attachment variable as the ItemAttachment parameter value. Specify the Path parameter value.

    Save-VESPItemExample 4. Saving SharePoint Document Library [For Veeam Backup for Microsoft Office 365]

    This example shows how to save the Regulations document library to the C:\save path.

    $session = Get-VBOSharePointItemRestoreSession

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

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

    Save-VESPItem -DocumentLibrary $documentLibrary -Path "C:\save"

    Perform the following steps:

    1. Get the SharePoint document library:
    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-VESPDocumentLibrary cmdlet. Set the $organization variable as the Organization parameter value. Specify the Name parameter value. Save the result to the $documentLibrary variable.
    1. Run the Save-VESPItem cmdlet. Set the $documentLibrary variable as the DocumentLibrary parameter value. Specify the Path parameter value.

    Save-VESPItemExample 5. Saving SharePoint Document [For Veeam Backup for Microsoft Office 365]

    This example shows how to save the reports.txt document to the C:\save path.

    $session = Get-VBOSharePointItemRestoreSession

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

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

    Save-VESPItem -Document $document -Path "C:\save"

    Perform the following steps:

    1. Get the SharePoint document.
    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.
    1. Run the Save-VESPItem cmdlet. Set the $document variable as the Document parameter value. Specify the Path parameter value.

    Save-VESPItemExample 6. Saving SharePoint Item Attachement [For Veeam Backup for Microsoft Office 365]

    This example shows how to save the attachments to the reports.txt item to the C:\save path.

    $session = Get-VBOSharePointItemRestoreSession

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

    $item = Get-VESPItem -Organization $organization -Query "reports.txt"

    $attachment = Get-VESPItemAttachment -Item $item

    Save-VESPItem -ItemAttachment $attachment -Path "C:\save"

    Perform the following steps:

    1. Get the SharePoint item:
    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-VESPItem cmdlet. Set the $database variable as the Database parameter value. Specify the Query parameter value. Save the result to the $item variable.
    4. Run the Get-VESPItemAttachment cmdlet. Set the $item variable as the Item parameter value. Save the result to the $attachment variable.
    1. Run the Get-VESPItemAttachment cmdlet. Set the $attachment variable as the ItemAttachment parameter value. Specify the Path parameter value.

    Related Commands