Help Center
Choose product document...
Veeam Backup & Replication 9.5 Update 4
Veeam Explorers PowerShell Reference

Restore-VEXItem

Short Description

Restores backups of Exchange organization mailboxes.

Applies to

Product Edition: Enterprise, Enterprise Plus

Syntax

This cmdlet provides the following parameter sets.

  • To restore an Exchange organization mailbox:

Restore-VEXItem -Mailbox <VEXMailbox> [-Server <String>] [-TargetMailbox <String>] [-Credential <PSCredential>] [-ToFolder <String>] [-RestoreChangedItem [<SwitchParameter>]] [-RestoreDeletedItem [<SwitchParameter>]] [-MarkAsUnread [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-ExcludeDrafts [<SwitchParameter>]] [-ExcludeDeletedItems [<SwitchParameter>]] [-ExcludeInPlaceHoldItems [<SwitchParameter>]] [-ExcludeLitigationHoldItems [<SwitchParameter>]]  [<CommonParameters>]

  • To restore a folder of Exchange organization mailbox:

Restore-VEXItem -Folder <VEXFolder> [-Server <String>] [-TargetMailbox <String>] [-Credential <PSCredential>] [-ToFolder <String>] [-RestoreChangedItem [<SwitchParameter>]] [-RestoreDeletedItem [<SwitchParameter>]] [-MarkAsUnread [<SwitchParameter>]] [-Force [<SwitchParameter>]]  [<CommonParameters>]

  • To restore items of Exchange organization mailbox:

Restore-VEXItem -Item <VEXItem[]> [-Server <String>] [-TargetMailbox <String>] [-Credential <PSCredential>] [-ToFolder <String>] [-RestoreChangedItem [<SwitchParameter>]] [-RestoreDeletedItem [<SwitchParameter>]] [-MarkAsUnread [<SwitchParameter>]] [-Force [<SwitchParameter>]]  [<CommonParameters>]

  • To restore multiple Exchange organization mailboxes:

Restore-VEXItem -MultipleMailboxes <VEXMailbox[]> [-SkipUnresolvedMailboxes] [-RestoreItemsForLastDays <int>] [-Office365Credential <pscredential>] [-Domain <string>] [-Credential <pscredential>] [-RestoreChangedItem [<SwitchParameter>]] [-RestoreDeletedItem [<SwitchParameter>]] [-MarkAsUnread [<SwitchParameter>]] [-Force [<SwitchParameter>]]  [<CommonParameters>]

Detailed Description

This cmdlet restores backups of Exchange organization mailboxes.

Restore-VEXItem Note:

Mind the following:

  • To perform restore operations, you must first start a restore session. For more information on how to start a restore session, see Start-VBOExchangeItemRestoreSession.
  • This cmdlet requires the PSCredential object. Use the Get-Credential cmdlet to create the PSCredentials object. For detailed instructions on how to run Get-Credential, see this Microsoft article.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Item

Specifies an array of items for Exchange organization mailbox. The cmdlet will restore these items.

True

Named

True (ByValue)

False

Folder

Specifies a folder of an Exchange organization mailbox. The cmdlet will restore this folder with all its subfolders.

True

Named

True (ByValue)

False

Mailbox

Specifies an Exchange organization mailbox that you want to restore.

True

Named

True (ByValue)

False

Server

Specifies the Microsoft Exchange server with the Client Access Server (CAS) role. The cmdlet will perform a restore to this mailbox server.

False

Named

False

False

Target
Mailbox

Specifies an Exchange organization mailbox. The cmdlet will perform a restore to this mailbox.

Note that the mailbox should be in the "username@domain" format.

If this parameter is omitted, the cmdlet will perform a restore to the same mailbox on the production Exchange server.

False

Named

False

False

Credential

Specifies account credentials that you want to use for connecting to the Microsoft Exchange server.

If omitted, the cmdlet will use a currently logged in user Windows account credentials to connect to the Microsoft Exchange server.

False

Named

False

False

ToFolder

Specifies a mailbox folder. The cmdlet will restore backups to this folder.

False

Named

False

False

Restore
Changed
Item

Indicates that the cmdlet will restore all versions of mailbox items that were modified by the user.

False

Named

False

False

Restore
Deleted
Item

Indicates that the cmdlet will restore mailbox items that were deleted by the user.

False

Named

False

False

Mark
AsUnread

Indicates that the cmdlet will mark the restored mailbox items as unread.

False

Named

False

False

Exclude
Deleted
Items

Indicates that the cmdlet will not restore the Deleted Items mailbox folder.

False

Named

False

False

Exclude
Drafts

Indicates that the cmdlet will not restore the Drafts mailbox folder.

False

Named

False

False

Exclude
InPlaceHold
Items

Indicates that the cmdlet will not restore preserved items of mailboxes placed on In-Place Hold.

False

Named

False

False

Exclude
LitigationHold
Items

Indicates that the cmdlet will not restore the preserved items of mailboxes placed on Litigation Hold.

False

Named

False

False

Force

Indicates that the cmdlet will perform a restore without notifying a user.

False

Named

False

False

MultipleMailboxes

Specifies an Exchange organization multiple mailboxes that you want to restore.

True

Named

True (ByValue)

False

SkipUnresolvedMailboxes

Indicates that the cmdlet will not restore mailboxes that it cannot resolve.

False

Named

False

False

RestoreItemsForLastDays

Specifies the number of subsequent past days from which this cmdlet will restore the items from the selected users in the first place.

False

Named

False

False

Office365Credential

Specifies account credentials that you want to use for connecting to the Microsoft Office365 server.

False

Named

False

False

Domain

Specifies the Exchange organization domain.

False

Named

False

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

[For Veeam Backup for Microsoft Office 365]  This example shows how to restore mailbox items to the production Microsoft Exchange server.

  1. Get the sales mailbox:
  1. Run Get-VBOExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VEXDatabase with the $session variable to get a mailbox database. Save the result to the $database variable.
  3. Run Get-VEXMailbox with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $mailbox variable.
  1. Run Get-Credential to create the PSCredential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
  2. Run Restore-VEXitem with the $salesmailbox and $creds variables.

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

PS C:\PS> $database = Get-VEXDatabase -Session $session

PS C:\PS> $salesmailbox = Get-VEXMailbox -Database $database -Name "sales"

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

PS C:\PS> Restore-VEXItem -Mailbox $salesmailbox -Server outlook.office365.com -Credential $creds -RestoreChangedItem

Example 2

[For Veeam Backup for Microsoft Office 365]  This example shows how to restore the Contacts folder to the sales@abc.onmicrosoft.com mailbox on the production Microsoft Exchange server.

  1. Get the mailbox folder with the Contacts name:
  1. Run Get-VBOExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VEXDatabase with the $session variable to get a mailbox database. Save the result to the $database variable.
  3. Run Get-VEXMailbox with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $salesmailbox variable.
  4. Run Get-VEXFolder with the $salesmailbox variable and the Name parameter to get the specific folder from the mailbox. Save the result to the $contacts variable.
  1. Run Get-Credential to create the PSCredential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
  2. Run Restore-VEXitem with the $contacts and $creds variables to restore the Contacts folder to the production Microsoft Exchange server. Use the TargetMailbox parameter to specify the mailbox to which the cmdlet will perform a restore.

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

PS C:\PS> $database = Get-VEXDatabase -Session $session

PS C:\PS> $salesmailbox = Get-VEXMailbox -Database $database -Name "north.sales"

PS C:\PS> $contacts = Get-VEXFolder -Mailbox $salesmailbox -Name "Contacts"

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

PS C:\PS> Restore-VEXItem -Folder $contacts -Server outlook.office365.com -Credential $creds -TargetMailbox "sales@abc.onmicrosoft.com" -RestoreChangedItem

Example 3

[For Veeam Backup for Microsoft Office 365]  This example shows how to restore all mailbox items from the Contacts folder and its subfolders to the production Microsoft Exchange server.

  1. Get all items from the Contacts folder:
  1. Run Get-VBOExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VEXDatabase with the $session variable to get a mailbox database. Save the result to the $database variable.
  3. Run Get-VEXMailbox with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $mailbox variable.
  4. Run Get-VEXFolder with the $mailbox variable and the Name parameter to get the specific folder from the mailbox. Save the result to the $contacts variable.
  5. Run Get-VEXItem with the $contacts variable and the Recurse parameter to get items from the parent folder and its subfolders. Save the result to the $contactitems variable.
  1. Run Get-Credential to create the PSCredential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
  2. Run Restore-VEXitem with the $contacts and $creds variables to restore all items from the Contacts folder and its subfolders to the production Microsoft Exchange server.

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

PS C:\PS> $database = Get-VEXDatabase -Session $session

PS C:\PS> $mailbox = Get-VEXMailbox -Database $database -Name "sales"

PS C:\PS> $contacts = Get-VEXFolder -Mailbox $mailbox

PS C:\PS> $contactitems = Get-VEXItem -Folder $contacts -Recurse

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

PS C:\PS> Restore-VEXItem -Item $contactitems -Server outlook.office365.com -Credential $creds -RestoreChangedItem -RestoreDeletedItem

Example 4

[For Veeam Backup & Replication] This example shows how to restore mailbox items to the production Microsoft Exchange server.

  1. Get the sales mailbox:
  1. Run Get-VBRExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VEXDatabase with the $session variable and the Name parameter to get the Mailbox Database 0754907780.edb database. Save the result to the $database variable.
  3. Run Get-VEXMailbox with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $salesmailbox variable.
  4. Run Get-Credential to create a credential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
  1. Run Restore-VEXitem with the $salesmailbox and $creds variables.

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

PS C:\PS> $database = Get-VEXDatabase -Session $session -Name "Mailbox Database 0754907780.edb"

PS C:\PS> $salesmailbox = Get-VEXMailbox -Database $database -Name "sales"

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

PS C:\PS> Restore-VEXItem -Mailbox $salesmailbox -Server ExchangeCAS.Domain.local -Credential $creds -RestoreChangedItem

Example 5

[For Veeam Backup & Replication] This example shows how to restore the Contacts folder to the sales@Domain.local mailbox on the production Microsoft Exchange server.

  1. Get the mailbox folder with the Contacts name:
  1. Run Get-VBRExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VEXDatabase with the $session variable to get the Mailbox Database 0754907780.edb database. Save the result to the $database variable.
  3. Run Get-VEXMailbox with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $salesmailbox variable.
  4. Run Get-VEXFolder with the $salesmailbox variable and the Name parameter to get the specific folder from the mailbox. Save the result to the $contacts variable.
  1. Run Get-Credential to create the PSCredential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
  2. Run Restore-VEXItem with the $contacts and $creds variables to restore the Contacts folder to the production Microsoft Exchange server. Use the TargetMailbox parameter to specify the mailbox to which the cmdlet will perform the restore.

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

PS C:\PS> $database = Get-VEXDatabase -Session $session -Name "Mailbox Database 0754907780.edb"

PS C:\PS> $salesmailbox = Get-VEXMailbox -Database $database -Name "sales"

PS C:\PS> $contacts = Get-VEXFolder -Mailbox $salesmailbox -Name "Contacts"

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

PS C:\PS> Restore-VEXItem -Folder $contacts -Server ExchangeCAS.Domain.local -Credential $creds -TargetMailbox "sales@Domain.local" -RestoreChangedItem

Example 6

[For Veeam Backup & Replication] This example shows how to restore all mailbox items from the Contacts folder and its subfolders to the production Microsoft Exchange server.

  1. Get all items from the Contacts folder:
  1. Run Get-VBRExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VEXDatabase with the $session variable and the Name parameter to get the Mailbox Database 0754907780.edb database. Save the result to the $database variable.
  3. Run Get-VEXMailbox with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $mailbox variable.
  4. Run Get-VEXFolder with the $mailbox variable and the Name parameter to get the specific folder from the mailbox. Save the result to the $contacts variable.
  5. Run Get-VEXItem with the $contacts variable and the Recurse parameter to get items from the parent folder and its subfolders. Save the result to the $contactitems variable.
  1. Run Get-Credential to create the PSCredential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
  2. Run Restore-VEXitem with the $contacts and $creds variables to restore all items from the Contacts folder and its subfolders to the production Microsoft Exchange server.

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

PS C:\PS> $database = Get-VEXDatabase -Session $session -Name "Mailbox Database 0754907780.edb"

PS C:\PS> $mailbox = Get-VEXMailbox -Database $database -Name "sales"

PS C:\PS> $contacts = Get-VEXFolder -Mailbox $mailbox -Name "Contacts"

PS C:\PS> $contactitems = Get-VEXItem -Folder $contacts -Recurse

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

PS C:\PS> Restore-VEXItem -Item $contactitems -Server ExchangeCAS.Domain.local -Credential $creds -RestoreChangedItem -RestoreDeletedItem

Related Commands

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions

Veeam Availability for Nutanix AHV

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation