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

Save-VESPItem

Short Description

Saves SharePoint items.

Syntax

This cmdlet provides 3 parameter sets.

  • For saving a SharePoint document library:

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

  • For saving a specific SharePoint document:

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

  • For saving 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

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Document

Specifies SharePoint document that you want to save.

True

0

True (ByValue)

False

DocumentLibrary

Specifies SharePoint document library that you want to save.

True

0

True (ByValue)

False

ItemAttachment

Specifies SharePoint item attachment that you want to save.

True

0

True (ByValue)

False

AsZip

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

False

Named

False

False

Path

Specifies a path to the specified item.

True

1

False

False

Force

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

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 send a SharePoint document library with a name "Test Document Library" to a specified path.

  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 the name "ABC". Save the result to the $organization variable.
  3. Run Get-VESPDocumentLibrary with the $organization variable and Name parameter to get a document library with a name "Test Document Library". Save the result to the $documentLibrary variable.
  4. Run Save-VESPItem with the $documentLibrary variable and Path parameter to save the document library to the specified path.

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

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> Save-VESPItem -DocumentLibrary $documentLibrary -Path "C:\save"

Example 2

This example shows how to send a SharePoint document with a name "document.txt" to a specified path.

  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 the 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".  Save the result to the $document variable.
  4. Run Save-VESPItem with the $document variable and Path parameter to save the document to the specified path.

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

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

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

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

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

Example 3

This example shows how to save an item attachment of a SharePoint item with a name "document.txt" to a specified path.

  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 the name "ABC". Save the result to the $organization variable.
  3. Run Get-VESPItem with the $organization variable and enter a "document.txt" value for a Query parameter to get a SharePoint item with a name "document.txt". Save the result to the $item variable.
  4. Run Get-VESPItemAttachment with the $item variable to get SharePoint item attachment. Save the result to the $attachment variable.
  5. Run Save-VESPItem with the $document variable and Path parameter to save the item attachment to the specified path.

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

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

PS C:\PS> $item = Get-VESPItem -Organization $organization -Query "document.txt"

PS C:\PS> $attachment = Get-VESPItemAttachment -Item $item

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

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference