Restore-VEXItem

In this article

    Short Description

    Restores backups of Exchange mailboxes.

    Applies to: Veeam Backup & Replication, Veeam Backup for Microsoft Office 365

    Product Edition: Enterprise, Enterprise Plus, Veeam Universal License

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • Restore an Exchange mailbox.

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

    • [Veeam Backup for Microsoft Office 365 only] Restore Exchange organization mailbox using Multi-factor authentication with an Azure AD application ID.

    Restore-VEXItem -Mailbox <VEXMailbox> -ApplicationId <guid> [-OrganizationName <string>] [-Region <VBOOffice365Region> {Worldwide | Germany | China | USDefence | USGovernment}] [-Server <string>] [-TargetMailbox <string>] [-Credential <pscredential>] [-ToFolder <string>] [-RestoreChangedItem] [-RestoreDeletedItem][-MarkAsUnread] [-Force] [-ExcludeDrafts] [-ExcludeDeletedItems] [-ExcludeInPlaceHoldItems][-ExcludeLitigationHoldItems]  [<CommonParameters>]

    • [Veeam Backup for Microsoft Office 365 only] Restore an Exchange mailbox using Multi-factor authentication with an Azure AD application.

    Restore-VEXItem -Mailbox <VEXMailbox> -ApplicationId <guid> -ApplicationCertificatePath <string> -ImpersonationAccountName <string> -ApplicationCertificatePassword <securestring> [-OrganizationName <string>] [-Region <VBOOffice365Region> {Worldwide | Germany | China | USDefence | USGovernment}] [-Server <string>] [-TargetMailbox <string>] [-Credential <pscredential>] [-ToFolder <string>] [-RestoreChangedItem] [-RestoreDeletedItem] [-MarkAsUnread] [-Force] [-ExcludeDrafts] [-ExcludeDeletedItems] [-ExcludeInPlaceHoldItems] [-ExcludeLitigationHoldItems]  [<CommonParameters>]

    • Restore Exchange mailbox folders.

    Restore-VEXItem -Folder <VEXFolder> [-Server <string>] [-TargetMailbox <string>] [-Credential <pscredential>][-ToFolder <string>] [-RestoreChangedItem] [-RestoreDeletedItem] [-MarkAsUnread] [-Force]  [<CommonParameters>]

    • [Veeam Backup for Microsoft Office 365 only] Restore Exchange mailbox folders using Multi-factor authentication with an Azure AD application ID.

    Restore-VEXItem -Folder <VEXFolder> -ApplicationId <guid> [-OrganizationName <string>] [-Region <VBOOffice365Region> {Worldwide | Germany | China | USDefence | USGovernment}] [-Server <string>] [-TargetMailbox <string>] [-Credential <pscredential>] [-ToFolder <string>] [-RestoreChangedItem] [-RestoreDeletedItem][-MarkAsUnread] [-Force]  [<CommonParameters>]

    • [Veeam Backup for Microsoft Office 365 only] Restore Exchange mailbox folders using Multi-factor authentication with an Azure AD application.

    Restore-VEXItem -Folder <VEXFolder> -ApplicationId <guid> -ApplicationCertificatePath <string> -ImpersonationAccountName <string> -ApplicationCertificatePassword <securestring> [-OrganizationName <string>] [-Region <VBOOffice365Region> {Worldwide | Germany | China | USDefence | USGovernment}] [-Server <string>][-TargetMailbox <string>] [-Credential <pscredential>] [-ToFolder <string>] [-RestoreChangedItem][-RestoreDeletedItem] [-MarkAsUnread] [-Force]  [<CommonParameters>]

    • Restore Exchange mailbox items.

    Restore-VEXItem -Item <VEXItem[]> [-Server <string>] [-TargetMailbox <string>] [-Credential <pscredential>][-ToFolder <string>] [-RestoreChangedItem] [-RestoreDeletedItem] [-MarkAsUnread] [-Force]  [<CommonParameters>]

    • [Veeam Backup for Microsoft Office 365 only] Restore Exchange mailbox items using Multi-factor authentication with an Azure AD application ID.

    Restore-VEXItem -Item <VEXItem[]> -ApplicationId <guid> [-OrganizationName <string>] [-Region <VBOOffice365Region> {Worldwide | Germany | China | USDefence | USGovernment}] [-Server <string>] [-TargetMailbox <string>] [-Credential <pscredential>] [-ToFolder <string>] [-RestoreChangedItem] [-RestoreDeletedItem] [-MarkAsUnread] [-Force]  [<CommonParameters>]

    • [Veeam Backup for Microsoft Office 365 only] Restore Exchange mailbox items using Multi-factor authentication with an Azure AD application.

    Restore-VEXItem -Item <VEXItem[]> -ApplicationId <guid> -ApplicationCertificatePath <string> -ImpersonationAccountName <string> -ApplicationCertificatePassword <securestring> [-OrganizationName <string>] [-Region <VBOOffice365Region> {Worldwide | Germany | China | USDefence | USGovernment}] [-Server <string>][-TargetMailbox <string>] [-Credential <pscredential>] [-ToFolder <string>] [-RestoreChangedItem][-RestoreDeletedItem] [-MarkAsUnread] [-Force]  [<CommonParameters>]

    • To restore multiple Exchange organization mailboxes.

    Restore-VEXItem -MultipleMailboxes <VEXMailbox[]> [-SkipUnresolvedMailboxes] [-RestoreItemsForLastDays <int>] [-Office365Credential <pscredential>] [-Domain <string>] [-Server <string>] [-Credential <pscredential>][-RestoreChangedItem] [-RestoreDeletedItem] [-MarkAsUnread] [-Force] [-ExcludeDrafts] [-ExcludeDeletedItems][-ExcludeInPlaceHoldItems] [-ExcludeLitigationHoldItems]  [<CommonParameters>]

    • [Veeam Backup for Microsoft Office 365 only] To restore multiple Exchange organization mailboxes with an Azure AD application ID.

    Restore-VEXItem -MultipleMailboxes <VEXMailbox[]> -ApplicationId <guid> [-SkipUnresolvedMailboxes][-RestoreItemsForLastDays <int>] [-Domain <string>] [-Server <string>] [-Credential <pscredential>][-RestoreChangedItem] [-RestoreDeletedItem] [-MarkAsUnread] [-Force] [-ExcludeDrafts] [-ExcludeDeletedItems][-ExcludeInPlaceHoldItems] [-ExcludeLitigationHoldItems]  [<CommonParameters>]

    • [Veeam Backup for Microsoft Office 365 only] To restore multiple Exchange organization mailboxes using Multi-factor authentication with an Azure AD application.

    Restore-VEXItem -MultipleMailboxes <VEXMailbox[]> -ApplicationId <guid> -ApplicationCertificatePath <string> -ImpersonationAccountName <string> [-SkipUnresolvedMailboxes] [-RestoreItemsForLastDays <int>] -ApplicationCertificatePassword <securestring> [-Domain <string>] [-Server <string>] [-Credential <pscredential>] [-RestoreChangedItem] [-RestoreDeletedItem] [-MarkAsUnread] [-Force] [-ExcludeDrafts][-ExcludeDeletedItems] [-ExcludeInPlaceHoldItems] [-ExcludeLitigationHoldItems]  [<CommonParameters>]

    Detailed Description

    This cmdlet restores backups of Exchange organization mailboxes. You can restore Exchange organization mailboxes with one of the following authentication methods:

    • Authentication methods that utilize legacy protocols.
    • Multi-factor authentication. To restore data the cmdlet utilizes an Azure AD application.

    Restore-VEXItem Note:

    • Before running this cmdlet, you must first start a restore session. For more information on how to start a restore session, see the Start-VBOExchangeItemRestoreSession cmdlet.
    • The machine on which you are going to run restore sessions must have a 64-bit version of Microsoft Outlook 2016, Microsoft Outlook 2013, or Microsoft Outlook 2010 installed.

    Parameters

    Parameter

    Description

    Type

    Required

    Position

    Accept Pipeline Input

    Item

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

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

    True

    Named

    True (ByValue)

    Folder

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

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

    True

    Named

    True (ByValue)

    Mailbox

    Specifies an Exchange organization mailbox that you want to restore.

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

    True

    Named

    True (ByValue)

    MultipleMailboxes

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

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

    True

    Named

    True (ByValue)

    ApplicationId

    To restore data using Multi-factor authentication.

    Specifies an ID of an Azure AD application. The cmdlet will use this application ID to set up a secure connection to a Microsoft organization.

    Note: This parameter is available for restore from backups created by Veeam Backup for Microsoft Office 365 version 4c and later.

    Guid

    True

    Named

    False

    ApplicationCertificatePath

    To restore data using Multi-factor authentication.

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

    Note: This parameter is available for restore from backups created by Veeam Backup for Microsoft Office 365 version 4c and later.

    String

    True

    Named

    False

    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 an Azure AD application. This parameter is obligatory.

    Note: This parameter is available for restore from backups created by Veeam Backup for Microsoft Office 365 version 4c and later.

    SecureString

    True

    Named

    False

    ImpersonationAccountName

    To restore data using Multi-factor authentication.

    Specifies a user name of a Microsoft Exchange user. The cmdlet will use this user name to authenticate against the Microsoft Exchange server. Use this parameter together with the ApplicationCertificatePassword parameter.

    Note: This parameter is available for restore from backups created by Veeam Backup for Microsoft Office 365 version 4c and later.

    String

    True

    Named

    False

    OrganizationName

    To restore data to another organization.

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

    Note: This parameter is available for restore from backups created by Veeam Backup for Microsoft Office 365 only.

    String

    False

    Named

    False

    Region

    To restore data to another organization.

    Specifies the Microsoft Azure region. The cmdlet will restore Exchange mailbox to a Microsoft organization that belongs to one of the following regions:

    • Worldwide
    • Germany
    • China
    • USDefence
    • USGovernment

    Note: This parameter is available for restore from backups created by Veeam Backup for Microsoft Office 365 only.

    VBOOffice365Region

    False

    Named

    False

    Server

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

    String

    False

    Named

    False

    TargetMailbox

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

    Note: The mailbox must 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.

    String

    False

    Named

    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.

    PSCredential

    False

    Named

    False

    ToFolder

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

    String

    False

    Named

    False

    RestoreChangedItem

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

    SwitchParameter

    False

    Named

    False

    RestoreDeletedItem

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

    SwitchParameter

    False

    Named

    False

    MarkAsUnread

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

    SwitchParameter

    False

    Named

    False

    ExcludeDeletedItems

    Defines that the cmdlet will not restore the Deleted Items folder.

    SwitchParameter

    False

    Named

    False

    ExcludeDrafts

    Indicates that the cmdlet will not restore the Drafts folder.

    SwitchParameter

    False

    Named

    False

    ExcludeInPlaceHoldItems

    Defines that the cmdlet will not restore mailbox items that have been placed on hold.

    SwitchParameter

    False

    Named

    False

    ExcludeLitigationHoldItems

    Defines that the cmdlet will not restore the mailbox items that have been placed on Litigation Hold.

    SwitchParameter

    False

    Named

    False

    Force

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

    SwitchParameter

    False

    Named

    False

    SkipUnresolvedMailboxes

    Defines that the cmdlet will not restore mailboxes that do not resolve.

    SwitchParameter

    False

    Named

    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.

    Int

    False

    Named

    False

    Office365Credential

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

    PsCredential

    False

    Named

    False

    Domain

    Specifies the Exchange organization domain.

    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

    None.

    Examples

    Restore-VEXItemExample 1. Restoring Exchange Mailbox [For Veeam Backup & Replication]

    This example shows how to restore the Sales mailbox with the following settings:

    • The cmdlet will restore mailbox to the ExchangeCAS.Domain.local production server.
    • The cmdlet will restore all versions of mailbox items that were modified by the user.

    $session = Get-VBRExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name "DB_0754907780.edb"

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

    $creds = Get-Credential

    Restore-VEXItem -Mailbox $salesmailbox -Server ExchangeCAS.Domain.local -Credential $creds -RestoreChangedItem

    Perform the following steps:

    1. Get the mailbox:
    1. Run the Get-VBRExchangeItemRestoreSession cmdlet. Save the result to the $session variable.
    2. Run the Get-VEXDatabase 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-VEXMailbox cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
    4. Run the Get-Credential cmdlet. Save the result to the $creds variable.
    1. Run the Restore-VEXitem cmdlet. Specify the following settings:
    • Set the $salesmailbox variable as the Mailbox parameter value.
    • Specify the Server parameter value.
    • Set the $salesmailbox variable as the Mailbox parameter value.
    • Provide the RestoreChangedItem parameter.

    Restore-VEXItemExample 2. Restoring Mailbox Folder [For Veeam Backup & Replication]

    This example shows how to restore the Contacts folder with the following settings:

    • The cmdlet will restore the contacts folder to the sales@Domain.local mailbox on the ExchangeCAS.Domain.local production server.
    • The cmdlet will restore all versions of mailbox items that were modified by the user.

    $session = Get-VBRExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name "DB_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

    Perform the following steps:

    1. Get the mailbox folder:
    1. Run the Get-VBRExchangeItemRestoreSession cmdlet. Save the result to the $session variable.
    2. Run the Get-VEXDatabase cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
    1. Run the Get-VEXMailbox cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
    2. Run the Get-VEXFolder cmdlet. Set the $salesmailbox variable as the Mailbox parameter value. Specify the Name parameter value. 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. Specify the following settings:
    • Set the $contacts variable as the Folder parameter value.
    • Specify the Server parameter value.
    • Set the $creds variable as the Credential parameter value.
    • Specify the TargetMailbox parameter value.
    • Provide the RestoreChangedItem parameter.

    Restore-VEXItemExample 3. Restoring all Mailbox Items [For Veeam Backup & Replication]

    This example shows how to restore all mailbox items with the following settings:

    • The cmdlet will restore items from the Contacts folder and its subfolders to the ExchangeCAS.Domain.local production server.
    • The cmdlet will restore all versions of mailbox items that were modified by the user.
    • The cmdlet will restore mailbox items that were deleted by the user.

    $session = Get-VBRExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name "DB_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

    Perform the following steps:

    1. Get all items from the folder:
    1. Run the Get-VBRExchangeItemRestoreSession cmdlet. Save the result to the $session variable.
    2. Run the Get-VEXDatabase 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-VEXMailbox cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
    4. Run the Get-VEXFolder cmdlet. Set the $salesmailbox variable as the Mailbox parameter value. Specify the Name parameter value. Save the result to the $contacts variable.
    5. Run the Get-VEXItem cmdlet. Set the $contacts variable as the Folder parameter value. Specify the Query parameter value. Save the result to the $smith variable.
    1. Run the Get-Credential cmdlet. Save the result to the $creds variable.
    2. Run the Restore-VEXitem cmdlet. Specify the following settings:
    • Set the $contactitems variable as the Item parameter value.
    • Specify the Server parameter value.
    • Set the $creds variable as the Credential parameter value.
    • Specify the TargetMailbox parameter value.
    • Provide the RestoreChangedItem parameter.
    • Provide the RestoreDeletedItem parameter.

    Restore-VEXItemExample 4. Restoring Multiple Mailboxes [For Veeam Backup & Replication]

    This example shows how to restore multiple Exchange mailboxes with the following settings:

    • The cmdlet will restore mailboxes to the ExchangeCAS.Domain.local production server.
    • The cmdlet will restore all versions of mailbox items that were modified by the user.
    • The cmdlet will restore mailbox items that were deleted by the user.

    $session = Get-VBRExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name "DB_0754907780.edb"

    $mailbox = Get-VEXMailbox -Database $database

    $creds = Get-Credential

    Restore-VEXItem -MultipleMailboxes $mailbox -Server ExchangeCAS.Domain.local -Credential $creds -RestoreChangedItem -RestoreDeletedItem

    Perform the following steps:

    1. Get all items from the folder:
    1. Run the Get-VBRExchangeItemRestoreSession cmdlet. Save the result to the $session variable.
    2. Run the Get-VEXDatabase 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-VEXMailbox cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
    1. Run the Get-Credential cmdlet. Save the result to the $creds variable.
    2. Run the Restore-VEXitem cmdlet. Specify the following settings:
    • Set the $mailbox variable as the MultipleMailboxes parameter value.
    • Specify the Server parameter value.
    • Set the $creds variable as the Credential parameter value.
    • Provide the RestoreChangedItem parameter.
    • Provide the RestoreDeletedItem parameter.

    Restore-VEXItemExample 5. Restoring Exchange Mailbox [For Veeam Backup for Microsoft Office 365]

    This example shows how to restore the Sales mailbox with the following settings:

    • The cmdlet will restore the mailbox to the outlook.office365.com production server.
    • The cmdlet will restore all versions of mailbox items that were modified by the user.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name support3backup.onmicrosoft.com

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

    $creds = Get-Credential

    Restore-VEXItem -Mailbox $salessmailbox -Server outlook.office365.com -Credential $creds -RestoreChangedItem

    Perform the following steps:

    1. Get the sales mailbox:
    1. Run the Get-VBOExchangeItemRestoreSession cmdlet. Save the result to the $session variable.
    2. Run the Get-VEXDatabase 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-VEXMailbox cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
    4. Run the Get-Credential cmdlet. Save the result to the $creds variable.
    1. Run the Restore-VEXitem cmdlet. Specify the following settings:
    • Set the $salesmailbox variable as the Mailbox parameter value.
    • Specify the Server parameter value.
    • Set the $creds variable as the Credential parameter value.
    • Provide the RestoreChangedItem parameter.

    Restore-VEXItemExample 6. Restoring Exchange Mailbox Using Multi-Factor Authentication with Azure AD Application ID [For Veeam Backup for Microsoft Office 365]

    This example shows how to restore the Sales mailbox with the following settings:

    • The cmdlet will use the c276f9ce-e4f2-4bdf-b9f2-e6c311c2e2a5 Azure AD application ID.
    • The cmdlet will restore the mailbox to the @tech-365.tech Microsoft organization.
    • The cmdlet will restore the mailbox to the Worldwide Microsoft Azure region.
    • The cmdlet will restore all versions of mailbox items that were modified by the user.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name support3backup.onmicrosoft.com

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

    Restore-VEXItem -Mailbox $salessmailbox -ApplicationId "c276f9ce-e4f2-4bdf-b9f2-e6c311c2e2a5" -OrganizationName @tech-365.tech -Region Worldwide -RestoreChangedItem

    Perform the following steps:

    1. Get the sales mailbox:
    1. Run the Get-VBOExchangeItemRestoreSession cmdlet. Save the result to the $session variable.
    2. Run the Get-VEXDatabase 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-VEXMailbox cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
    1. Run the Restore-VEXitem cmdlet. Specify the following settings:
    • Set the $salesmailbox variable as the Mailbox parameter value.
    • Specify the ApplicationId parameter value
    • Specify the OrganizationName parameter value.
    • Specify the Region parameter value
    • Provide the RestoreChangedItem parameter.
    1. To set up a secure connection to a Microsoft organization, open the https://microsoft.com/devicelogin link in a browser and enter the code that you get in the PowerShell Console to authenticate to the Microsoft Office 365 server.

    Restore-VEXItemExample 7. Restoring Exchange Mailbox Using Multi-Factor Authentication with Azure AD Application [For Veeam Backup for Microsoft Office 365]

    This example shows how to restore the Sales mailbox with the following settings:

    • The cmdlet will use the c276f9ce-e4f2-4bdf-b9f2-e6c311c2e2a5 Azure AD application ID.
    • The cmdlet will use the certificate located at the C:\Certificate\ path.
    • The cmdlet will restore the mailbox to the @tech-365.tech Microsoft organization.
    • The cmdlet will restore the mailbox to the Worldwide Microsoft Azure region.
    • The cmdlet will restore all versions of mailbox items that were modified by the user.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name support3backup.onmicrosoft.com

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

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

    Enter password: ********

    Restore-VEXItem -Mailbox $salessmailbox -ApplicationId "c276f9ce-e4f2-4bdf-b9f2-e6c311c2e2a5" -ApplicationCertificatePath "C:\Certificate\" -ApplicationCertificatePassword $securepassword -ImpersonationAccountName "global2@tech-365.tech"-OrganizationName @tech-365.tech -Region Worldwide -RestoreChangedItem

    Perform the following steps:

    1. Get the sales mailbox:
    1. Run the Get-VBOExchangeItemRestoreSession cmdlet. Save the result to the $session variable.
    2. Run the Get-VEXDatabase 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-VEXMailbox cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
    1. 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. Provide the AsSecureString parameter to convert the password to the secure string.
    2. Enter the password.
    1. Run the Restore-VEXitem cmdlet. Specify the following settings:
    • Set the $salesmailbox variable as the Mailbox parameter value.
    • Specify the ApplicationId parameter value
    • Specify the ApplicationCertificatePath parameter value.
    • Set the $securepassword variable as the ApplicationCertificatePassword parameter value.
    • Specify the ImpersonationAccountName parameter value.
    • Specify the OrganizationName parameter value.
    • Specify the Region parameter value
    • Provide the RestoreChangedItem parameter.

    Restore-VEXItemExample 8. Restoring Folder [For Veeam Backup for Microsoft Office 365]

    This example shows how to restore the Contacts folder with the following settings:

    • The cmdlet will restore the contacts folder to the sales@abc.onmicrosoft.com mailbox on the outlook.office365.com production server.
    • The cmdlet will restore all versions of mailbox items that were modified by the user.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name support3backup.onmicrosoft.com

    $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

    Perform the following steps:

    1. Get the mailbox folder:
    1. Run the Get-VBOExchangeItemRestoreSession. Save the result to the $session variable.
    2. Run the Get-VEXDatabase 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-VEXMailbox cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
    4. Run the Get-VEXFolder cmdlet. Set the $salesmailbox variable as the Mailbox parameter value. Specify the Name parameter value. 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. Specify the following settings:
    • Set the $contacts variable as the Folder parameter value.
    • Specify the Server parameter value.
    • Set the $creds variable as the Credential parameter value.
    • Specify the TargetMailbox parameter value.
    • Provide the RestoreChangedItem parameter.

    Restore-VEXItemExample 9. Restoring all Mailbox Items [For Veeam Backup for Microsoft Office 365]

    This example shows how to restore all mailbox items with the following settings:

    • The cmdlet will restore items from the Contacts folder and its subfolders to the outlook.office365.com production server.
    • The cmdlet will restore all versions of mailbox items that were modified by the user.
    • The cmdlet will restore mailbox items that were deleted by the user.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name support3backup.onmicrosoft.com

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

    $contacts = Get-VEXFolder -Mailbox $salesmailbox

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

    $creds = Get-Credential

    Restore-VEXItem -Item $contactitems -Server outlook.office365.com -Credential $creds -RestoreChangedItem -RestoreDeletedItem

    Perform the following steps:

    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. 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-VEXMailbox cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
    4. Run the Get-VEXFolder cmdlet. Set the $salesmailbox variable as the Mailbox parameter value. Specify the Name parameter value. Save the result to the $contacts variable.
    5. Run the Get-VEXItem cmdlet. Set the $contacts variable as the Folder parameter value. Specify the Query parameter value. Save the result to the $smith variable.
    1. Run the Get-Credential cmdlet. Save the result to the $creds variable.
    2. Run the Restore-VEXitem cmdlet. Specify the following settings:
    • Set the $contactitems variable as the Item parameter value.
    • Specify the Server parameter value.
    • Set the $creds variable as the Credential parameter value.
    • Specify the TargetMailbox parameter value.
    • Provide the RestoreChangedItem parameter.
    • Provide the RestoreDeletedItem parameter.

    Restore-VEXItemExample 10. Restoring Exchange Mailbox Using Multi-Factor Authentication [For Veeam Backup for Microsoft Office 365]

    This example shows how to restore mailbox items to the same organization with the following settings:

    • The cmdlet will use the 7ddefae2-c812-4fe8-bd8b-6222efc8b434 Azure AD application ID to restore mailbox.
    • The cmdlet will restore all versions of mailbox items that were modified by the user.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name "DB_0754907780.edb"

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

    $creds = Get-Credential

    Restore-VEXItem -Mailbox $salesmailbox -Credential $creds -ApplicationId "7ddefae2-c812-4fe8-bd8b-6222efc8b434" -RestoreChangedItem

    Perform the following steps:

    1. Get the mailbox:
    1. Run the Get-VBOExchangeItemRestoreSession cmdlet. Save the result to the $session variable.
    2. Run the Get-VEXDatabase 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-VEXMailbox cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
    4. Run the Get-Credential cmdlet. Save the result to the $creds variable.
    1. Run the Restore-VEXitem cmdlet. Specify the following settings:
    • Set the $salesmailbox variable as the Mailbox parameter value.
    • Set the $creds variable as the Credential parameter value.
    • Specify the ApplicationId parameter value.
    • Provide the RestoreChangedItem parameter.

    Restore-VEXItemExample 11. Restoring Exchange Mailbox to Different Organization [For Veeam Backup for Microsoft Office 365]

    This example shows how to restore mailbox items to the Atlanta Microsoft organization with the following settings:

    • The Atlanta Microsoft organization belongs to the Worldwide Microsoft Azure region.
    • The cmdlet will apply the 7ddefae2-c812-4fe8-bd8b-6222efc8b434 Azure AD application ID to restore data.
    • The cmdlet restore the mailbox items to the UserA@tech.local mailbox.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name "DB_0754907780.edb"

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

    $creds = Get-Credential

    Restore-VEXItem -Mailbox $salesmailbox -Credential $creds -OrganizationName Atlanta -Region Worldwide -TargetMailbox UserA@tech.local  -RestoreChangedItem

    Perform the following steps:

    1. Get the mailbox:
    1. Run the Get-VBOExchangeItemRestoreSession cmdlet. Save the result to the $session variable.
    2. Run the Get-VEXDatabase 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-VEXMailbox cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
    1. Run the Get-Credential cmdlet. Save the result to the $creds variable.
    1. Run the Restore-VEXitem cmdlet. Specify the following settings:
    • Set the $salesmailbox variable as the Mailbox parameter value.
    • Set the $creds variable as the Credential parameter value.
    • Specify the OrganizationName parameter value.
    • Specify the Worldwide parameter value.
    • Specify the TargetMailbox parameter value
    • Provide the RestoreChangedItem parameter.

    Related Commands