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

Export-VEXItem

In this article

    Short Description

    Exports Exchange organization backups.

    Applies to

    Product Edition: Community, Standard, Enterprise, Enterprise Plus

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • To export databases of Exchange organization mailboxes:

    Export-VEXItem -Database <VEXDatabase[]> -To <string> [-Force] [-ContentKeyword <string[]>]  [<CommonParameters>]

    • To export an Exchange organization mailboxes:

    Export-VEXItem -Mailbox <VEXMailbox> -To <string> [-Force] [-ContentKeyword <string[]>]  [<CommonParameters>]

    • To export an Exchange organization mailbox folder:

    Export-VEXItem -Folder <VEXFolder> -To <string> [-Force] [-ContentKeyword <string[]>]  [<CommonParameters>]

    • To export Exchange organization mailbox items:

    Export-VEXItem -Item <VEXItem[]> -To <string> [-Force]  [<CommonParameters>]

    Detailed Description

    This cmdlet exports Exchange organization mailbox databases, mailboxes, folders and mailbox items into Personal Folder Files (.PST files). Additionally, the cmdlet exports mailbox items to Outlook Message Files (.MSG files).

    Export-VEXItem Note:

    Mind the following:

    • You must first start a restore session. For more information on how to start a restore session, see Start-VBOExchangeItemRestoreSession.
    • 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

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    Item

    Specifies items of Exchange organization mailbox. The cmdlet will export 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 Exchange organization mailbox. The cmdlet will export 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 export.

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

    True

    Named

    True (ByValue)

    False

    Database

    Specifies a database of an Exchange organization mailbox. The cmdlet will export this database.

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

    True

    Named

    True (ByValue)

    False

    To

    Specifies a path and a name for the .PST file or a path for .MSG files.

    To export databases, mailboxes and folders to a .PST file, specify the path and the name for the .PST file. The cmdlet will create the .PST file with the specified name if it doesn't exist.

    To export items to .MSG files, specify the path and the folder. The cmdlet will create the.MSG file for each item in the folder that you specified.

    True

    Named

    False

    False

    Force

    Indicates that the cmdlet will perform export operations without notifying the user.

    False

    Named

    False

    False

    Content
    KeyWord

    Specifies a keyword to query data for Exchange organization mailbox. The cmdlet will look for the specified keywords in all message fields (From, To, Subject, Body). After that, the cmdlet will export data that contains the specified keywords.

    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 export the northsales.onmicrosoft.com mailbox database to the North.pst file.

    1. Get the northsales.onmicrosoft.com mailbox database:
    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. Save the result to the $salesmailbox variable.
    1. Run the Export-VEXitem cmdlet with the $database variable to export the northsales.onmicrosoft.com mailbox database to the North.pst file.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session

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

    Export-VEXItem -Database $database -To "C:\North Backup\North.pst"

    Example 2

    [For Veeam Backup for Microsoft Office 365] This example shows how to export the sales mailbox to the Sales.pst file.

    1. Get the sales mailbox:
    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.
    1. Run the Export-VEXitem cmdlet with the $salesmailbox variable to export the sales mailbox to the Sales.pst file.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session

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

    Export-VEXItem -Mailbox $salesmailbox -To "C:\North Backup\Sales\Sales.pst"

    Example 3

    [For Veeam Backup for Microsoft Office 365] This example shows how to export the Contacts folder to the Contacts.pst file.

    1. Get the Contacts mailbox 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 $salesmailbox variable.
    4. Run the Get-VEXFolder cmdlet with the $salesmailbox variable and the Name parameter to get a specific folder from the mailbox. Save the result to the $contacts variable.
    1. Run the Export-VEXitem cmdlet with the $contacts variable to export the Contacts folder to the Contacts.pst file.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session

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

    $contacts = Get-VEXFolder -Mailbox $salesmailbox

    Export-VEXItem -Folder $contacts -To "C:\North Backup\Sales\Contacts\Contacts.pst"

    Example 4

    [For Veeam Backup for Microsoft Office 365] This example shows how to export mailbox items with the names containing smith from the Contacts folder to the Smith Contacts.pst file.

    1. Get items with names containing smith 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 Query parameter to get items with names containing a specified keyword. Save the result to the $smith variable.
    1. Run the Export-VEXitem cmdlet with the $smith variable to export items with names containing smith from the Contacts folder to the Smith Contacts.pst file.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session

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

    $contacts = Get-VEXFolder -Mailbox $mailbox

    $smith = Get-VEXItem -Folder $contacts -Query "smith"

    Export-VEXItem -Item $smith -To "C:\North Backup\Sales\Contacts\Smith\Smith Contacts.pst"

    Example 5

    [For Veeam Backup for Microsoft Office 365] This example shows how to export mailbox items with names containing smith from the Contacts folder to .MSG files.

    1. Get items with names containing smith 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 Query parameter to get items with names containing a specified keyword. Save the result to the $smith variable.
    1. Run the Export-VEXitem cmdlet with the $smith variable to export items to .MSG files to the Smith folder.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session

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

    $contacts = Get-VEXFolder -Mailbox $mailbox

    $smith = Get-VEXItem -Folder $contacts -Query "smith"

    Export-VEXItem -Item $smith -To "C:\North Backup\Sales\Contacts\Smith"

    Example 6

    [For Veeam Backup & Replication] This example shows how to export the Mailbox Database 0754907780.edb mailbox database to the Mailbox Database 0754907780.pst file.

    1. Get the Mailbox Database 0754907780.edb mailbox database:
    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.
    1. Run the Export-VEXitem cmdlet with the $database variable to export the Mailbox Database 0754907780.edb database to the Mailbox Database 0754907780.pst file.

    $session = Get-VBRExchangeItemRestoreSession

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

    Export-VEXItem -Database $database -To "C:\Backup\Mailbox Database 0754907780.pst"

    Example 7

    [For Veeam Backup & Replication] This example shows how to export the sales mailbox to the Sales.pst file.

    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.
    1. Run the Export-VEXitem cmdlet with the $salesmailbox variable to export the sales mailbox to the Sales.pst file.

    $session = Get-VBRExchangeItemRestoreSession

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

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

    Export-VEXItem -Mailbox $salesmailbox -To "C:\North Backup\Sales\Sales.pst"

    Example 8

    [For Veeam Backup & Replication] This example shows how to export the Contacts folder to the Contacts.pst file.

    1. Get the Contacts mailbox 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 $salesmailbox variable.
    4. Run the Get-VEXFolder cmdlet with the $salesmailbox variable and the Name parameter to get a specific folder from the mailbox. Save the result to the $contacts variable.
    1. Run the Export-VEXitem cmdlet with the $contacts variable to export the Contacts folder to the Contacts.pst file.

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

    Export-VEXItem -Folder $contacts -To "C:\North Backup\Sales\Contacts\Contacts.pst"

    Example 9

    [For Veeam Backup & Replication] This example shows how to export mailbox items with the names containing smith from the Contacts folder to the Smith Contacts.pst file.

    1. Get items with names containing smith 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 Query parameter to get items with names containing a specified keyword. Save the result to the $smith variable.
    1. Run the Export-VEXitem cmdlet with the $smith variable to export items with names containing smith from the Contacts folder to the Smith Contacts.pst file.

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

    $smith = Get-VEXItem -Folder $contacts -Query "smith"

    Export-VEXItem -Item $smith -To "C:\North Backup\Sales\Contacts\Smith\Smith Contacts.pst"

    Example 10

    [For Veeam Backup & Replication] This example shows how to export mailbox items with names containing smith from the Contacts folder to .MSG files.

    1. Get items with names containing smith 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 Query parameter to get items with names containing a specified keyword. Save the result to the $smith variable.
    1. Run the Export-VEXitem cmdlet with the $smith variable to export items to .MSG files to the Smith folder.

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

    $smith = Get-VEXItem -Folder $contacts -Query "smith"

    Export-VEXItem -Item $smith -To "C:\North Backup\Sales\Contacts\Smith"

    Related Commands