This is an archive version of the document. To get the most up-to-date information, see the current version.

Restore-VEXItem

In this article

    Short Description

    Restores backups of Exchange organization mailboxes.

    Applies to

    Product Edition: Enterprise, Enterprise Plus

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • 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.

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

    True

    Named

    True (ByValue)

    False

    Folder

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

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

    True

    Named

    True (ByValue)

    False

    Mailbox

    Specifies an Exchange organization mailbox that you want to restore.

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

    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 on common parameters, see the About CommonParameters section of Microsoft Docs.

    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.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session

    $salesmailbox = Get-VEXMailbox -Database $database -Name "sales"

    $creds = Get-Credential

    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 the Get-VBOExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VEXDatabase cmdlet with the $session variable to get a mailbox database. Save the result to the $database variable.
    3. Run the Get-VEXMailbox cmdlet 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 the Get-VEXFolder cmdlet 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 the Get-Credential cmdlet 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 the Restore-VEXitem cmdlet 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.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session

    $salesmailbox = Get-VEXMailbox -Database $database -Name "north.sales"

    $contacts = Get-VEXFolder -Mailbox $salesmailbox -Name "Contacts"

    $creds = Get-Credential

    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 the Get-VBOExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VEXDatabase cmdlet with the $session variable to get a mailbox database. Save the result to the $database variable.
    3. Run the Get-VEXMailbox cmdlet 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 the Get-VEXFolder cmdlet 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 the Get-VEXItem cmdlet 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 the Get-Credential cmdlet 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 the Restore-VEXitem cmdlet with the $contacts and $creds variables to restore all items from the Contacts folder and its subfolders to the production Microsoft Exchange server.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session

    $mailbox = Get-VEXMailbox -Database $database -Name "sales"

    $contacts = Get-VEXFolder -Mailbox $mailbox

    $contactitems = Get-VEXItem -Folder $contacts -Recurse

    $creds = Get-Credential

    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 the Get-VBRExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VEXDatabase cmdlet 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 the Get-VEXMailbox cmdlet 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 the Get-Credential cmdlet 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 the Restore-VEXitem cmdlet with the $salesmailbox and $creds variables.

    $session = Get-VBRExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name "Mailbox Database 0754907780.edb"

    $salesmailbox = Get-VEXMailbox -Database $database -Name "sales"

    $creds = Get-Credential

    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 the Get-VBRExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VEXDatabase cmdlet with the $session variable to get the Mailbox Database 0754907780.edb database. Save the result to the $database variable.
    3. Run the Get-VEXMailbox cmdlet 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 the Get-VEXFolder cmdlet 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 the Get-Credential cmdlet 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 the Restore-VEXItem cmdlet 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.

    $session = Get-VBRExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name "Mailbox Database 0754907780.edb"

    $salesmailbox = Get-VEXMailbox -Database $database -Name "sales"

    $contacts = Get-VEXFolder -Mailbox $salesmailbox -Name "Contacts"

    $creds = Get-Credential

    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 the Get-VBRExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VEXDatabase cmdlet 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 the Get-VEXMailbox cmdlet 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 the Get-VEXFolder cmdlet 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 the Get-VEXItem cmdlet 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 the Get-Credential cmdlet 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 the Restore-VEXitem cmdlet with the $contacts and $creds variables to restore all items from the Contacts folder and its subfolders to the production Microsoft Exchange server.

    $session = Get-VBRExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name "Mailbox Database 0754907780.edb"

    $mailbox = Get-VEXMailbox -Database $database -Name "sales"

    $contacts = Get-VEXFolder -Mailbox $mailbox -Name "Contacts"

    $contactitems = Get-VEXItem -Folder $contacts -Recurse

    $creds = Get-Credential

    Restore-VEXItem -Item $contactitems -Server ExchangeCAS.Domain.local -Credential $creds -RestoreChangedItem -RestoreDeletedItem

    Related Commands