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

Restore-VESPItem

Short Description

Restores SharePoint item.

Syntax

This cmdlet provides 5 parameter sets.

  • For restoring a specific SharePoint site:

Restore-VESPItem [-Site] <VESPSite> [-SiteURL] <string> [-RestoreSubsites] [-Credential <pscredential>] [-RestorePermissions] [-SkipPermissionNotificationSending] [-RestoreChangedItems] [-RestoreDeletedItems] [-RestoreListViews]  [<CommonParameters>]

  • For restoring a SharePoint list:

Restore-VESPItem [-List] <VESPList> [-SiteURL] <string> [-TargetList <string>] [-Credential <pscredential>] [-RestorePermissions] [-SkipPermissionNotificationSending] [-RestoreChangedItems] [-RestoreDeletedItems] [-RestoreListViews]  [<CommonParameters>]

  • For restoring a SharePoint document library:

Restore-VESPItem [-DocumentLibrary] <VESPDocumentLibrary> [-SiteURL] <string> [-TargetList <string>] [-Credential <pscredential>] [-RestorePermissions] [-SkipPermissionNotificationSending] [-RestoreChangedItems] [-RestoreDeletedItems] [-RestoreListViews]  [<CommonParameters>]

  • For restoring a specific SharePoint item:

Restore-VESPItem [-Item] <VESPItem[]> [-SiteURL] <string> [-TargetList <string>] [-Credential <pscredential>] [-RestorePermissions] [-SkipPermissionNotificationSending] [-RestoreChangedItems] [-RestoreDeletedItems]  [<CommonParameters>]

  • For restoring a SharePoint document:

Restore-VESPItem [-Document] <VESPDocument[]> [-SiteURL] <string> [-TargetList <string>] [-Credential <pscredential>] [-RestorePermissions] [-SkipPermissionNotificationSending] [-RestoreChangedItems] [-RestoreDeletedItems]  [<CommonParameters>]

Detailed Description

This cmdlet restores SharePoint items.

To perform restore operations, you must first start a restore session. For more information, see Start-VBOSharePointItemRestoreSession.

Restore-VESPItem Note:

This cmdlet requires a PSCredential object. Use Get-Credential to create the PSCredentials object.

For more information on Get-Credential, see https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.security/get-credential.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Site

Specifies the name of the SharePoint site. This cmdlet will restore SharePoint item from the specified SharePoint site.

True

0

True (ByValue)

False

RestoreSubsites

Indicates that the cmdlet will restore the child sites.

False

Named

False

False

SiteURL

Specifies the SharePoint site URL. This cmdlet will restore SharePoint item from a SharePoint site with the specified URL.

True

1

False

False

Credential

Specifies the account credentials you want to use for connecting to the SharePoint server.

If omitted, the cmdlet will use a currently logged in user's Windows account credentials for connecting to the SharePoint server.

False

Named

False

False

RestorePermissions

Indicates that the cmdlet will restore permissions.

False

Named

False

False

Skip
Permission
NotificationSending

Indicates that the cmdlet will not send permission notification.

False

Named

False

False

RestoreChangedItems

Indicates that the cmdlet will restore changed items.

False

Named

False

False

RestoreDeletedItems

Indicates that the cmdlet will restore deleted items.

False

Named

False

False

RestoreListViews

Indicates that the cmdlet will restore the SharePoint list views.

False

Named

False

False

List

Specifies the name of the SharePoint list. This cmdlet will restore the SharePoint item from the specified list.

True

0

True (ByValue)

False

TargetList

Specifies the name of the SharePoint list where the restore will be performed to.

False

Named

False

False

DocumentLibrary

Specifies the name of the SharePoint document library. This cmdlet will restore a SharePoint item from a specified document library.

True

0

True (ByValue)

Fase

Item

Specifies the name of the SharePoint item. This cmdlet will restore a specified SharePoint item.

True

Named

True (ByValue)

False

Document

Specifies the name of the SharePoint document. This cmdlet will restore a SharePoint item with a specified SharePoint document.

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 restore a SharePoint site with a name "Team Site".

  1. Run Get-Credential to create a credential object. Type the credentials you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Run Get-VBOSharePointItemRestoreSession to get the active restore session. Save the result to the $session variable.
  3. Run Get-VESPOrganization with the $session variable to get the organization with the name "ABC". Save the result to the $organization variable.
  4. Run Get-VESPSite with the $organization variable and Name parameter to get the site with a name "Team Site" from the SharePoint organization. Save the result to the $site variable.
  5. Run Restore-VESPItem with the $site and $credentials variables. Use RestoreSubsites, RestoreMasterPages, RestorePermissions, RestoreChangedItems, RestoreDeletedItems and RestoreListViews in order to restore the corresponding entities.

PS C:\PS> $credentials = Get-Credential

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> Restore-VESPItem -Site $site -RestoreSubsites -RestoreMasterPages -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Example 2

This example shows how to restore a SharePoint list with a name "Color name list" to the specified production list.

  1. Run Get-Credential to create a credential object. Type the credentials you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Run Get-VBOSharePointItemRestoreSession to get the active restore session. Save the result to the $session variable.
  3. Run Get-VESPOrganization with the $session variable to get the organization with the name "ABC". Save the result to the $organization variable.
  4. Run Get-VESPList with the $organization variable and Name parameter to get the site with a name "Color name list" from the SharePoint organization. Save the result to the $site variable.
  5. Run Restore-VESPItem with the $list and $credentials variables. Use RestorePermissions, RestoreChangedItems, RestoreDeletedItems and RestoreListViews in order to restore the corresponding entities.

PS C:\PS> $credentials = Get-Credential

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

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

PS C:\PS> $list = Get-VESPList -Organization $organization -Name "Color names list"

PS C:\PS> Restore-VESPItem -List $list -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Example 3

This example shows how to restore a SharePoint document library with a name "Test Document Library".

  1. Run Get-Credential to create a credential object. Type the credentials you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Run Get-VBOSharePointItemRestoreSession to get the active restore session. Save the result to the $session variable.
  3. Run Get-VESPOrganization with the $session variable to get the organization with the name "ABC". Save the result to the $organization variable.
  4. Run Get-VESPDocumentLibrary with the $organization variable and Name parameter to get the document library with a name "Test Document Library" from the SharePoint organization. Save the result to the $documentLibrary variable.
  5. Run Restore-VESPItem with the $documentLibrary and $credentials variables. Use RestorePermissions, RestoreChangedItems, RestoreDeletedItems and RestoreListViews in order to restore the corresponding entities.

PS C:\PS> $credentials = Get-Credential

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> Restore-VESPItem -DocumentLibrary $documentLibrary -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Example 4

This example shows how to restore a SharePoint item.

  1. Run Get-Credential to create a credential object. Type the credentials you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Run Get-VBOSharePointItemRestoreSession to get the active restore session. Save the result to the $session variable.
  3. Run Get-VESPOrganization with the to get the organization with the name "ABC". Save the result to the $organization variable.
  4. Run Get-VESPItem with the $organization variable and a value for a Query parameter. Save the result to the $item variable.
  5. Run Restore-VESPItem with the $item and $credentials variables. Use RestorePermissions, RestoreChangedItems, RestoreDeletedItems and RestoreListViews in order to restore the corresponding entities.

PS C:\PS> $credentials = Get-Credential

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

PS C:\PS> Restore-VESPItem -Item $item -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems

Example 5

This example shows how to restore a SharePoint document with a name "document.txt".

  1. Run Get-Credential to create a credential object. Type the credentials you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Run Get-VBOSharePointItemRestoreSession to get the active restore session. Save the result to the $session variable.
  3. Run Get-VESPOrganization with the $session variable to get the organization with the name "ABC". Save the result to the $organization variable.
  4. Run Get-VESPDocument with the $organization variable and Name parameter to get the document with a name "document.txt" from the SharePoint organization. Save the result to the $document variable.
  5. Run Restore-VESPItem with the $documentLibrary and $credentials variables. Use RestorePermissions, RestoreChangedItems and RestoreDeletedItems in order to restore the corresponding entities.

PS C:\PS> $credentials = Get-Credential

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> Restore-VESPItem -Document $document -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference