Start-VBOExchangeItemRestoreSession

In this article

    Short Description

    Starts restore sessions to explore backed-up Microsoft Exchange objects and to perform operations with them.

    Applies to: Veeam Backup for Microsoft Office 365

    Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License

    Syntax

    This cmdlet provides parameter sets that allow you to.

    • Explore or restore Microsoft Exchange objects from the latest restore point.

    Start-VBOExchangeItemRestoreSession -LatestState [-Job <IVBOJob>] [-Organization <IVBOOrganization>] [-ShowDeleted] [-ShowAllVersions]  [<CommonParameters>]

    • Explore or restore Microsoft Exchange objects from the specified restore point.

    Start-VBOExchangeItemRestoreSession -RestorePoint <IVBORestorePoint> [-Job <IVBOJob>] [-Organization <IVBOOrganization>] [-ShowDeleted] [-ShowAllVersions]  [<CommonParameters>]

    • Explore or restore Microsoft Exchange objects from the latest restore point remotely.

    Start-VBOExchangeItemRestoreSession -Server <string> -Credential <pscredential> [-Port <int>] [-SkipCertificateCheck] [-ShowDeleted] [-ShowAllVersions]  [<CommonParameters>]

    Detailed Description

    This cmdlet establishes a connection to the Veeam Backup for Microsoft Office 365 server and retrieves Exchange objects backed up on this server. Within the restore session, you can get backed-up Exchange objects using the following cmdlets:

    After you get backed-up Exchange objects, you can perform the following operations with these objects:

    Parameters

    Parameter

    Description

    Type

    Required

    Position

    Accept Pipeline Input

    Accept Wildcard Characters

    LatestState

    Defines that the cmdlet will retrieve data from a mailbox database at the state of the latest restore point.

    SwitchParameter

    True

    Named

    False

    False

    RestorePoint

    Specifies a restore point to start a new restore session. You will be able to use the session to perform operations with items that this restore point contains.

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

    True

    Named

    True (ByValue)

    False

    Server

    Specifies a DNS name or an IP address of the Veeam Backup for Microsoft Office 365 server that backed up items that you want to restore.

    String

    True

    Named

    False

    False

    Credential

    Specifies credentials that will be used to authenticate against the Veeam Backup for Microsoft Office 365 server.

    PSCredential

    True

    Named

    False

    False

    Job

    Specifies a backup job to start a new restore session. You will be able to use the session to perform operations with items backed up by this job.

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

    False

    Named

    True (ByValue)

    False

    Organization

    Specifies an organization to start a new restore session. You will be able to use the session to perform operations with items backed up for this organization.

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

    False

    Named

    True (ByValue)

    False

    ShowDeleted

    Defines that deleted items will be included in the current session. If you provide this parameter, you will be able to perform operations with these items.

    Note: If you provide this parameter, the amount of data returned by cmdlets within the current session may significantly increase.

    SwitchParameter

    False

    Named

    False

    False

    ShowAllVersions

    Defines that all versions of SharePoint items will be included in the current session. If you provide this parameter, you will be able to perform operations with these items.

    Note: If you provide this parameter, the amount of data returned by cmdlets within the current session may significantly increase.

    SwitchParameter

    False

    Named

    False

    False

    Port

    Specifies a port number that will be used to connect to the Veeam Backup for Microsoft Office 365 server.

    Int32

    False

    Named

    False

    False

    SkipCertificateCheck

    Defines that the cmdlet will not perform the SSL certificate check.

    SwitchParameter

    False

    Named

    False

    False

    <CommonParameters>

    This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Docs.

    Examples

    Start-VBOExchangeItemRestoreSessionExample 1. Starting Restore Session From Latest Restore Point

    This example shows how to start a restore session to perform operations with Microsoft Exchange objects. The restore session will start with the following settings:

    • The cmdlet will retrieve data from a mailbox database from the state of the latest restore point.
    • The cmdlet will start a restore session only for backups associated with the ABC organization.

     

    $organization = Get-VBOOrganization -Name "ABC"

    Start-VBOExchangeItemRestoreSession -LatestState -Organization $organization

    Perform the following steps:

    1. Run the Get-VBOOrganization cmdlet. Specify the Name parameter value. Save the result to the $organization variable.
    2. Run the Start-VBOExchangeItemRestoreSession cmdlet. Provide the LatestState parameter. Set the $organization variable as the Organization parameter value.

    Start-VBOExchangeItemRestoreSessionExample 2. Starting Restore Session From Specific Restore Point

    This example shows how to start a restore session to perform operations with Microsoft Exchange objects. The restore session will start with the following settings:

    • The cmdlet will retrieve a mailbox database at the state of the selected restore point.
    • The cmdlet will start a restore session only for backups that were created by the Sales Reports backup job.

    $restorepoint = Get-VBORestorePoint

    $job = Get-VBOJob -Name "Sales Reports"

    Start-VBOExchangeItemRestoreSession -RestorePoint $restorepoint[2] -Job $job

    Perform the following steps:

    1. Run the Get-VBORestorePoint cmdlet. Save the result to the $restorepoint variable.

    The Get-VBORestorePoint cmdlet will return an array of active restore sessions. Mind the ordinal number of the necessary restore session (in our example, it is the third restore session in the array).

    1. Run the Get-VBOJob cmdlet. Specify the Name parameter value. Save the result to the $job variable.
    1. Run the Start-VBOExchangeItemRestoreSession cmdlet. Set the $restorepoint[2] variable as the RestorePoint parameter value. Set the $job variable as the Job parameter value.

    Start-VBOExchangeItemRestoreSessionExample 3. Starting Restore Session From Specific Restore Point [Using Piplines]

    This example shows how to start a restore session to perform operations with Microsoft Exchange objects. The restore session will start with the following settings:

    • The cmdlet will retrieve a mailbox database at the state of the selected restore point.
    • The cmdlet will start a restore session only for backups that were created by the Sales Reports backup job.

     

    $restorepoint = Get-VBORestorePoint | Select-Object -Property BackupTime | Select-Object -First 2

    $job = Get-VBOJob -Name "Sales Reports"

    Start-VBOExchangeItemRestoreSession -RestorePoint $restorepoint -Job $job

    Perform the following steps:

    1. Run the Get-VBORestorePoint cmdlet.
    2. Pipe the cmdlet output to the Select-Object cmdlet. Set the BackupTime property as the Property parameter value.
    3. Pipe the cmdlet output to the Save the result to the Select-Object cmdlet. Specify the First parameter value. Save the result to the $restorepoint variable.
    4. Run the Get-VBOJob cmdlet. Specify the Name parameter value. Save the result to the $job variable.
    5. Run the Start-VBOExchangeItemRestoreSession cmdlet. Set the $restorepoint variable as the RestorePoint parameter value. Set the $job as the Job parameter value.

    Start-VBOExchangeItemRestoreSessionExample 4. Starting Restore Session From Latest Restore Point Remotely

    This example shows how to start a remote restore session to perform operations with Microsoft Exchange objects. The cmdlet will connect to the vbo365server.support.local server to retrieve a mailbox database at the state of the latest restore point.

    $credentials = Get-Credential

    Start-VBOExchangeItemRestoreSession -Server vbo365server.support.local -Credential $credentials

    1. Run the Get-Credential cmdlet to create a credential object. Enter credentials that will be used to connect to the Veeam Backup for Microsoft Office 365 server. Save the result to the $credentials variable.
    2. Run the Start-VBOExchangeItemRestoreSession cmdlet. Specify the Server parameter value. Set the $credentials variable as the Credential parameter value.

    Start-VBOExchangeItemRestoreSessionExample 5. Performing Restore Scenario

    This example shows how to perform a restore scenario. The restore scenario includes the following steps:

    • Start a remote restore session for a mailbox database at the state of the latest restore point.
    • Perform an item restore from an organization mailbox.
    • Stop a restore session.

     

    $vbosrvcreds = Get-Credential

    Start-VBOExchangeItemRestoreSession -Server vbo365server.support.local -Credential $vbosrvcreds

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session

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

    $exsrvcreds = Get-Credential

    Restore-VEXItem -Mailbox $mailbox -Server outlook.office365.com -Credential $exsrvcreds -RestoreChangedItem

    Stop-VBOExchangeItemRestoreSession -Session $session

    Perform the following steps:

    1. Start the remote restore session for the mailbox database at the state of the latest restore point:
    1. Run the Get-Credential cmdlet to create a credential object. Enter credentials that will be used to connect to the Veeam Backup for Microsoft Office 365 server. Save the result to the $vbosrvcreds variable
    2. Run the Start-VBOExchangeItemRestoreSession cmdlet. Specify the Server parameter value. Set the $vbosrvcreds variable as the Credential parameter value.
    1. Perform an item restore:
    1. Get a mailbox item that you want to restore:
    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. 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 $mailbox variable.
    1. Run the Get-Credential cmdlet.. Save the result to the $exsrvcreds variable.
    2. Run the Restore-VEXitem cmdlet. Specify the Mailbox, Server,Credential RestoreChangedItem parameters values.
    1. Run the Stop-VBOExchangeItemRestoreSession cmdlet. Set the $session variable as the Session parameter value.

    Related Commands