Restore-VESPItem

Short Description

Restores SharePoint items.

Product: Veeam Backup & Replication, Veeam Backup for Microsoft 365

Product Edition: Enterprise, Enterprise Plus, Veeam Universal License

Syntax

This cmdlet provides the following parameter sets:

  • siteParameterSet

    Restore-VESPItem [-Site] <VESPSite> [-RestoreSubsites] [[-SiteURL] <String>] [-SiteAlias <String>]

    [-OfficeRegion <OfficeRegion>] [-OrganizationName <String>] [-Credential <PSCredential>]

    [-ApplicationId <Guid>] [-ApplicationCertificatePath <String>]

    [-ApplicationCertificatePassword <SecureString>] [-ImpersonationAccountName <String>] [-RestorePermissions]

    [-SkipPermissionNotificationSending] [-RestoreChangedItems] [-RestoreDeletedItems] [-RestoreListViews] [<CommonParameters>]

  • listParameterSet

    Restore-VESPItem [-List] <VESPList> [-TargetList <String>] [[-SiteURL] <String>] [-SiteAlias <String>]

    [-OfficeRegion <OfficeRegion>] [-OrganizationName <String>] [-Credential <PSCredential>]

    [-ApplicationId <Guid>] [-ApplicationCertificatePath <String>]

    [-ApplicationCertificatePassword <SecureString>] [-ImpersonationAccountName <String>] [-RestorePermissions]

    [-SkipPermissionNotificationSending] [-RestoreChangedItems] [-RestoreDeletedItems] [-RestoreListViews] [<CommonParameters>]

  • docLibParameterSet

    Restore-VESPItem [-DocumentLibrary] <VESPDocumentLibrary> [-TargetList <String>] [[-SiteURL] <String>]

    [-SiteAlias <String>] [-OfficeRegion <OfficeRegion>] [-OrganizationName <String>] [-Credential <PSCredential>]

    [-ApplicationId <Guid>] [-ApplicationCertificatePath <String>]

    [-ApplicationCertificatePassword <SecureString>] [-ImpersonationAccountName <String>] [-RestorePermissions]

    [-SkipPermissionNotificationSending] [-RestoreChangedItems] [-RestoreDeletedItems] [-RestoreListViews] [<CommonParameters>]

  • itemParameterSet

    Restore-VESPItem [-Item] <VESPItem[]> [-TargetList <String>] [[-SiteURL] <String>] [-SiteAlias <String>]

    [-OfficeRegion <OfficeRegion>] [-OrganizationName <String>] [-Credential <PSCredential>]

    [-ApplicationId <Guid>] [-ApplicationCertificatePath <String>]

    [-ApplicationCertificatePassword <SecureString>] [-ImpersonationAccountName <String>] [-RestorePermissions]

    [-SkipPermissionNotificationSending] [-RestoreChangedItems] [-RestoreDeletedItems] [<CommonParameters>]

  • documentParameterSet

    Restore-VESPItem [-Document] <VESPDocument[]> [-TargetList <String>] [[-SiteURL] <String>]

    [-SiteAlias <String>] [-OfficeRegion <OfficeRegion>] [-OrganizationName <String>] [-Credential <PSCredential>]

    [-ApplicationId <Guid>] [-ApplicationCertificatePath <String>]

    [-ApplicationCertificatePassword <SecureString>] [-ImpersonationAccountName <String>] [-RestorePermissions]

    [-SkipPermissionNotificationSending] [-RestoreChangedItems] [-RestoreDeletedItems] [<CommonParameters>]

Detailed Description

This cmdlet allows you to restore SharePoint sites and the following objects that are related to this site:

  • SharePoint sites
  • SharePoint lists
  • SharePoint document libraries
  • SharePoint items
  • SharePoint documents

You can restore SharePoint sites with one of the following authentication methods:

  • Authentication methods that use legacy protocols.
  • Multi-factor authentication. To restore data the cmdlet uses a Microsoft Entra application.

Note

To perform restore operations, you must first start a restore session. For more information on how to start a restore session, see Start-VBOSharePointItemRestoreSessionStarts restore sessions to explore backed-up SharePoint items and to perform operations with these items. or Start-VBRSharePointItemRestoreSessionStarts restore sessions to explore backed-up Microsoft SharePoint databases and to perform operations with these databases..

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

ApplicationCertificatePassword

To restore data using multi-factor authentication.

Specifies the certificate password. The cmdlet will use this password to confirm the certificate that you want to import to a Microsoft Entra application. This parameter is obligatory.

SecureString

False

Named

False

ApplicationCertificatePath

To restore data using multi-factor authentication.

Specifies a path to the folder where the certificate is located. The cmdlet will import the certificate that is located in this path to set up an encrypted connection to a Microsoft organization.

String

False

Named

False

ApplicationId

To restore data using multi-factor authentication.

Specifies a Microsoft Entra application ID. The cmdlet will use this application ID to set up a secure connection to a Microsoft organization.

Guid

False

Named

False

Credential

Specifies account credentials that you want to use to connect to the SharePoint server.

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

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

PSCredential

False

Named

False

Document

Specifies an array of names for SharePoint documents. This cmdlet will restore SharePoint items from documents with the specified names.

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

VESPDocument[]

True

0

True (ByValue)

DocumentLibrary

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

Accepts the VESPDocumentLibrary object. To get this object, run the Get-VESPDocumentLibraryReturns SharePoint document libraries. cmdlet.

VESPDocumentLibrary

True

0

True (ByValue)

ImpersonationAccountName

To restore data using multi-factor authentication.

Specifies a user name of the account that will be used as a SharePoint site owner account to restore a SharePoint site. Use this parameter together with the ApplicationCertificatePassword parameter.

String

False

Named

False

Item

Specifies an array of names for SharePoint items. This cmdlet will restore SharePoint items with the specified names.

Accepts the VESPItem[] object. To get this object, run the Get-VESPItemReturns SharePoint items. cmdlet.

VESPItem[]

True

0

True (ByValue)

List

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

Accepts the VESPList object. To get this object, run the Get-VESPListReturns SharePoint lists. cmdlet.

VESPList

True

0

True (ByValue)

OfficeRegion

To restore data to another Microsoft organization.

Specifies a Microsoft Entra region. The cmdlet will restore SharePoint item to a Microsoft organization that belongs to one of the following regions:

  • Worldwide
  • Germany
  • China
  • USDefence
  • USGovernment

OfficeRegion

False

Named

False

OrganizationName

To restore data to another Microsoft organization without creating new target sites, lists or libraries.

Specifies an organization name. The cmdlet will restore SharePoint item to this organization.

String

False

Named

False

RestoreChangedItems

Defines that the cmdlet will restore changed items.

Default: False

SwitchParameter

False

Named

False

RestoreDeletedItems

Defines that the cmdlet will restore deleted items.

Default: False

SwitchParameter

False

Named

False

RestoreListViews

Defines that the cmdlet will restore the SharePoint list views.

Default: False

SwitchParameter

False

Named

False

RestorePermissions

Defines that the cmdlet will restore permissions.

Default: False

SwitchParameter

False

Named

False

RestoreSubsites

Defines that the cmdlet will restore child sites.

Default: False

SwitchParameter

False

Named

False

Site

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

Accepts the VESPSite object. To get this object, run the Get-VESPSiteReturns SharePoint sites. cmdlet.

VESPSite

True

0

True (ByValue)

SiteAlias

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

Note: This parameter does not work for restore from backups created by Veeam Backup & Replication.

String

False

Named

False

SiteURL

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

If you do not provide this parameter, the cmdlet will restore a SharePoint site to the original site.

String

False

1

False

SkipPermissionNotificationSending

Defines that the cmdlet will not send permission notification.

Default: False

SwitchParameter

False

Named

False

TargetList

Specifies a name of the SharePoint list. The cmdlet will restore items to this list.

Note: If you do not provide this parameter, the cmdlet will restore the SharePoint list to the original location.

String

False

Named

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 VESPRestoreResult[] array that contains information about the restore process.

Examples

Restore-VESPItemExample 1. Restoring SharePoint Site to Original Site [For Veeam Backup & Replication]

This example shows how to restore the Teams SharePoint site with the following settings:

  • The cmdlet will restore site permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.
  • The cmdlet will restore the SharePoint list views.

$credentials = Get-Credential

$session = Get-VBRSharePointItemRestoreSession

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

$site = Get-VESPSite -Database $database -Name "Teams"

Restore-VESPItem -Site $site -RestoreSubsites -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Perform the following steps:

  1. Get the SharePoint site:

    1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
    2. Run the Get-VBRSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft SharePoint databases. cmdlet. Save the result to the $session variable.
    3. Run the Get-VESPDatabaseReturns backed-up Microsoft SharePoint databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
    4. Run the Get-VESPSiteReturns SharePoint sites. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $site variable.
  2. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $site variable as the Site parameter value.
    • Provide the RestoreSubsites parameter.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.
    • Provide the RestoreListViews parameter.

Restore-VESPItemExample 2. Restoring SharePoint Site to Another Site [For Veeam Backup & Replication]

This example shows how to restore the Teams SharePoint site to the http://servername/sitename site with the following settings:

  • The cmdlet will restore site permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.
  • The cmdlet will restore the SharePoint list views.

$credentials = Get-Credential

$session = Get-VBRSharePointItemRestoreSession

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

$site = Get-VESPSite -Database $database -Name "Teams"

Restore-VESPItem -Site $site -RestoreSubsites -SiteURL "http://servername/sitename" -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Perform the following steps:

  1. Get the SharePoint site:

    1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
    2. Run the Get-VBRSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft SharePoint databases. cmdlet. Save the result to the $session variable.
    3. Run the Get-VESPDatabaseReturns backed-up Microsoft SharePoint databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
    4. Run the Get-VESPSiteReturns SharePoint sites. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $site variable.
  2. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $site variable as the Site parameter value.
    • Provide the RestoreSubsites parameter.
    • Specify the SiteURL parameter value.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.
    • Provide the RestoreListViews parameter.

Restore-VESPItemExample 3. Restoring SharePoint List [For Veeam Backup & Replication]

This example shows how to restore the Color names SharePoint list to the http://servername/sitename site with the following settings:

  • The cmdlet will restore permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.
  • The cmdlet will restore the SharePoint list views.

$credentials = Get-Credential

$session = Get-VBRSharePointItemRestoreSession

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

$list = Get-VESPList -Database $database -Name "Color names"

Restore-VESPItem -List $list -SiteURL "http://servername/sitename" -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Perform the following steps:

  1. Get the SharePoint list:

    1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
    2. Run the Get-VBRSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft SharePoint databases. cmdlet. Save the result to the $session variable.
    3. Run the Get-VESPDatabaseReturns backed-up Microsoft SharePoint databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
    4. Run the Get-VESPListReturns SharePoint lists. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $list variable.
  2. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $list variable as the List parameter value.
    • Specify the SiteURL parameter value.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.
    • Provide the RestoreListViews parameter.

Restore-VESPItemExample 4. Restoring SharePoint Document Library [For Veeam Backup & Replication]

This example shows how to restore the Regulations SharePoint document library to the http://servername/sitename site with the following settings:

  • The cmdlet will restore permissions.
  • The cmdlet will restore changed items.

$credentials = Get-Credential

$session = Get-VBRSharePointItemRestoreSession

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

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

Restore-VESPItem -DocumentLibrary $documentLibrary -SiteURL "http://servername/sitename" -Credential $credentials -RestorePermissions -RestoreChangedItems

Perform the following steps:

  1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Get the SharePoint document library:

    1. Run the Get-VBRSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft SharePoint databases. cmdlet. Save the result to the $session variable.
    2. Run the Get-VESPDatabaseReturns backed-up Microsoft SharePoint databases. 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-VESPDocumentLibraryReturns SharePoint document libraries. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $documentLibrary variable.
  3. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $documentLibrary variable as the DocumentLibrary parameter value.
    • Specify the SiteURL parameter value.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.

Restore-VESPItemExample 5. Restoring SharePoint Item [For Veeam Backup & Replication]

This example shows how to restore a SharePoint item to the original location with the following settings:

  • The cmdlet will restore permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.

$credentials = Get-Credential

$session = Get-VBRSharePointItemRestoreSession

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

$site = Get-VESPSite -Database $database -Name "Teams"

$item = Get-VESPItem -Site $site -Query "new"

Restore-VESPItem -Item $item[0] -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems

Perform the following steps:

  1. Get the SharePoint site:

    1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
    2. Run the Get-VBRSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft SharePoint databases. cmdlet. Save the result to the $session variable.
    3. Run the Get-VESPDatabaseReturns backed-up Microsoft SharePoint databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
    4. Run the Get-VESPSiteReturns SharePoint sites. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $site variable.
  2. Run the Get-VESPItemReturns SharePoint items. cmdlet. Set the $site variable as the Site parameter value. Specify the Query parameter value. Save the result to the $item variable.

    The cmdlet will return an array of items. Note the ordinal number of the necessary item. In this example, it is the first item in the array.

  3. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $item[0] variable as the Item parameter value.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.

Restore-VESPItemExample 6. Restoring SharePoint Document [For Veeam Backup & Replication]

This example shows how to restore the reports.txt document from the Teams site to the http://servername/sitename site with the following settings:

  • The cmdlet will restore permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.

$credentials = Get-Credential

$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"

Restore-VESPItem -Document $document -SiteURL "http://servername/sitename" -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems

Perform the following steps:

  1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Get the SharePoint document:

    1. Run the Get-VBRSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft SharePoint databases. cmdlet. Save the result to the $session variable.
    2. Run the Get-VESPDatabaseReturns backed-up Microsoft SharePoint databases. 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-VESPSiteReturns SharePoint sites. 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-VESPDocumentReturns SharePoint documents. 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 Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $document variable as the Document parameter value.
    • Specify the SiteURL parameter value.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.

Restore-VESPItemExample 7. Restoring SharePoint Site to Original Site [For Veeam Backup for Microsoft 365]

This example shows how to restore the Teams SharePoint site with the following settings:

  • The cmdlet will restore site permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.
  • The cmdlet will restore the SharePoint list views.

$credentials = Get-Credential

$session = Get-VBOSharePointItemRestoreSession

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

$site = Get-VESPSite -Organization $organization -Name "Teams"

Restore-VESPItem -Site $site -RestoreSubsites -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Perform the following steps:

  1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Get the SharePoint site:

    1. Run the Get-VBOSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up SharePoint items. cmdlet. Save the result to the $session variable.
    2. Run the Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $organization variable.
    3. Run the Get-VESPSiteReturns SharePoint sites. cmdlet. Set the $organization variable as the Organization parameter value. Specify the Name parameter value. Save the result to the $site variable.
  3. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $site variable as the Site parameter value.
    • Provide the RestoreSubsites parameter.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.
    • Provide the RestoreListViews parameter.

Restore-VESPItemExample 8. Restoring SharePoint Site Using Multi-Factor Authentication with Microsoft Entra Application ID [For Veeam Backup for Microsoft 365]

This example shows how to restore the Teams SharePoint site with the following settings:

  • The cmdlet will apply the 6049d4a6-b814-4b67-aa4c-14580af94dce Microsoft Entra application ID to connect to a Microsoft organization.
  • The cmdlet will restore site permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.
  • The cmdlet will restore the SharePoint list views.

$session = Get-VBOSharePointItemRestoreSession

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

$site = Get-VESPSite -Organization $organization -Name "Teams"

Restore-VESPItem -Site $site -RestoreSubsites -ApplicationId 6049d4a6-b814-4b67-aa4c-14580af94dce -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Perform the following steps:

  1. Get the SharePoint site:

    1. Run the Get-VBOSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up SharePoint items. cmdlet. Save the result to the $session variable.
    2. Run the Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $organization variable.
    3. Run the Get-VESPSiteReturns SharePoint sites. 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 Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $site variable as the Site parameter value.
    • Provide the RestoreSubsites parameter.
    • Specify the ApplicationId parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.
    • Provide the RestoreListViews parameter.
  3. To set up a secure connection to a Microsoft organization, open the https://microsoft.com/devicelogin link in your browser and enter the code that you get in the PowerShell Console for authenticating to the Microsoft 365 server.

Restore-VESPItemExample 9. Restoring SharePoint Site Using Multi-Factor Authentication with Microsoft Entra Application Certificate [For Veeam Backup for Microsoft 365]

This example shows how to restore the Teams SharePoint site with the following settings:

  • The cmdlet will apply the 6049d4a6-b814-4b67-aa4c-14580af94dce Microsoft Entra application ID to connect to a Microsoft organization.
  • The cmdlet will use the certificate located at the C:\Certificate path.
  • The cmdlet will restore site permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.
  • The cmdlet will restore the SharePoint list views.

$session = Get-VBOSharePointItemRestoreSession

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

$site = Get-VESPSite -Organization $organization -Name "Teams"

$securepassword = Read-Host -Prompt "Enter password" -AsSecureString

Restore-VESPItem -Site $site -RestoreSubsites -ApplicationId 6049d4a6-b814-4b67-aa4c-14580af94dce -ApplicationCertificatePath "C:\Certificate\Cert.pfx" -ApplicationCertificatePassword $securepassword -ImpersonationAccountName "global2@tech-365.tech" -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Perform the following steps:

  1. Get the SharePoint site:

    1. Run the Get-VBOSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up SharePoint items. cmdlet. Save the result to the $session variable.
    2. Run the Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $organization variable.
    3. Run the Get-VESPSiteReturns SharePoint sites. 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 Read-Host cmdlet to specify the password. Specify the text that will show up in the password prompt window in the Prompt parameter. Specify the AsSecureString parameter to convert the password to the secure string.
  3. Enter the password.
  4. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $site variable as the Site parameter value.
    • Provide the RestoreSubsites parameter.
    • Specify the ApplicationId parameter value.
    • Specify the ApplicationCertificatePath parameter value.
    • Specify the ApplicationCertificatePassword parameter value.
    • Specify the ImpersonationAccountName parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.
    • Provide the RestoreListViews parameter.

Restore-VESPItemExample 10. Restoring SharePoint Site to Another Site [For Veeam Backup for Microsoft 365]

This example shows how to restore the Teams SharePoint site to the AliasTeamSite alias site with the following settings:

  • The cmdlet will restore site permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.
  • The cmdlet will restore the SharePoint list views.

$credentials = Get-Credential

$session = Get-VBOSharePointItemRestoreSession

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

$site = Get-VESPSite -Organization $organization -Name "Teams"

Restore-VESPItem -Site $site -RestoreSubsites -SiteAlias "AliasTeamSite" -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Perform the following steps:

  1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Get the SharePoint site:

    1. Run the Get-VBOSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up SharePoint items. cmdlet. Save the result to the $session variable.
    2. Run the Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $organization variable.
    3. Run the Get-VESPSiteReturns SharePoint sites. cmdlet. Set the $organization variable as the Organization parameter value. Specify the Name parameter value. Save the result to the $site variable.
  3. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $site variable as the Site parameter value.
    • Provide the RestoreSubsites parameter.
    • Specify the SiteAlias parameter value.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.
    • Provide the RestoreListViews parameter.

Restore-VESPItemExample 11. Restoring SharePoint List [For Veeam Backup for Microsoft 365]

This example shows how to restore the Color names SharePoint list to the ABC organization production list with the following settings:

  • The cmdlet will restore permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.
  • The cmdlet will restore the SharePoint list views.

$credentials = Get-Credential

$session = Get-VBOSharePointItemRestoreSession

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

$list = Get-VESPList -Organization $organization -Name "Color names"

Restore-VESPItem -List $list -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Perform the following steps:

  1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Get the SharePoint list:

    1. Run the Get-VBOSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up SharePoint items. cmdlet. Save the result to the $session variable.
    2. Run the Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $organization variable.
    3. Run the Get-VESPListReturns SharePoint lists. cmdlet. Set the $organization variable as the Organization parameter value. Specify the Name parameter value. Save the result to the $list variable.
  3. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $list variable as the List parameter value.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.
    • Provide the RestoreListViews parameter.

Restore-VESPItemExample 12. Restoring SharePoint Document Library [For Veeam Backup for Microsoft 365]

This example shows how to restore the Test SharePoint document library with the following settings:

  • The cmdlet will restore permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.
  • The cmdlet will restore the SharePoint list views.

$credentials = Get-Credential

$session = Get-VBOSharePointItemRestoreSession

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

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

Restore-VESPItem -DocumentLibrary $documentLibrary -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems -RestoreListViews

Perform the following steps:

  1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Get the SharePoint document library:

    1. Run the Get-VBOSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up SharePoint items. cmdlet. Save the result to the $session variable.
    2. Run the Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $organization variable.
    3. Run the Get-VESPDocumentLibraryReturns SharePoint document libraries. cmdlet. Set the $organization variable as the Organization parameter value. Specify the Name parameter value. Save the result to the $documentLibrary variable.
  3. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $documentLibrary variable as the DocumentLibrary parameter value.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.
    • Provide the RestoreListViews parameter.

Restore-VESPItemExample 13. Restoring SharePoint Item [For Veeam Backup for Microsoft 365]

This example shows how to restore a SharePoint item added to the ABC organization with the following settings:

  • The cmdlet will restore permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.

$credentials = Get-Credential

$session = Get-VBOSharePointItemRestoreSession

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

$item = Get-VESPItem -Organization $organization -Query "new"

Restore-VESPItem -Item $item[0] -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems

Perform the following steps:

  1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Get the SharePoint item:

    1. Run the Get-VBOSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up SharePoint items. cmdlet. Save the result to the $session variable.
    2. Run the Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $organization variable.
    3. Run the Get-VESPItemReturns SharePoint items. cmdlet. Set the $organization variable as the Organization parameter value. Specify the Query parameter value. Save the result to the $item variable.

      The cmdlet will return an array of items. Note the ordinal number of the necessary item. In this example, it is the first item in the array.

  3. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $item[0] variable as the Item parameter value.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.

Restore-VESPItemExample 14. Restoring SharePoint Document [For Veeam Backup for Microsoft 365]

This example shows how to restore a SharePoint document with the following settings:

  • The cmdlet will restore permissions.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.

$credentials = Get-Credential

$session = Get-VBOSharePointItemRestoreSession

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

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

Restore-VESPItem -Document $document -Credential $credentials -RestorePermissions -RestoreChangedItems -RestoreDeletedItems

Perform the following steps:

  1. Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use for connecting to the SharePoint server. Save the result to the $credentials variable.
  2. Get the SharePoint document:

    1. Run the Get-VBOSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up SharePoint items. cmdlet. Save the result to the $session variable.
    2. Run the Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $organization variable.
    3. Run the Get-VESPDocumentReturns SharePoint documents. cmdlet. Set the $organization variable as the Organization parameter value. Specify the Query parameter value. Save the result to the $document variable.
  3. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $document variable as the Document parameter value.
    • Set the $credentials variable as the Credential parameter value.
    • Provide the RestorePermissions parameter.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.

Restore-VESPItemExample 15. Restoring SharePoint List Item to Another Microsoft 365 Organization [For Veeam Backup for Microsoft 365]

This example shows how to restore a SharePoint item added to the ABC organization to another Microsoft 365 organization with the following settings:

  • The cmdlet will apply the 6049d4a6-b814-4b67-aa4c-14580af94dce Microsoft Entra application ID to connect to a Microsoft organization.
  • The cmdlet will use the certificate located at the C:\Certificate path.
  • The cmdlet will restore changed items.
  • The cmdlet will restore deleted items.

$session = Get-VBOSharePointItemRestoreSession

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

$list = Get-VESPList -Organization $organization -Name "ABC One"

$item = Get-VESPItem -List $list -Query "new"

$siteUrl = "https://xyz.sharepoint.com/sites/xyz_site"

$securepassword = Read-Host -Prompt "Enter password" -AsSecureString

Restore-VESPItem -Item $item -SiteURL $siteUrl -TargetList "ListName" -OrganizationName "xyz.onmicrosoft.com" -ApplicationId 6049d4a6-b814-4b67-aa4c-14580af94dce -ApplicationCertificatePath "C:\Certificate\Cert.pfx" -ApplicationCertificatePassword $securepassword -RestoreChangedItems -RestoreDeletedItems

Perform the following steps:

  1. Get the SharePoint item:

    1. Run the Get-VBOSharePointItemRestoreSessionReturns active restore sessions started to perform operations with backed-up SharePoint items. cmdlet. Save the result to the $session variable.
    2. Run the Get-VESPOrganizationReturns SharePoint organizations added to Veeam Backup for Microsoft 365. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $organization variable.
    3. Run the Get-VESPListReturns SharePoint lists. cmdlet. Set the $organization variable as the Organization parameter value. Specify the Name parameter value. Save the result to the $list variable.
    4. Run the Get-VESPItemReturns SharePoint items. cmdlet. Set the $list variable as the List parameter value. Specify the Query parameter value. Save the result to the $item variable.
  2. Save the target SharePoint organization site URL address to the $siteUrl variable.
  3. Run the Read-Host cmdlet to specify the password. Specify the text that will show up in the password prompt window in the Prompt parameter. Specify the AsSecureString parameter to convert the password to the secure string.
  4. Enter the password.
  5. Run the Restore-VESPItem cmdlet. Specify the following settings:

    • Set the $item variable as the Item parameter value.
    • Set the $siteUrl variable as the SiteURL variable.
    • Specify the TargetList parameter value.
    • Specify the OrganizationName parameter value.
    • Specify the ApplicationId parameter value.
    • Specify the ApplicationCertificatePath parameter value.
    • Specify the ApplicationCertificatePassword parameter value.
    • Provide the RestoreChangedItems parameter.
    • Provide the RestoreDeletedItems parameter.

Page updated 2026-08-18

Page content applies to build 13.1.1.18