Export-VEXItem
Short Description
Exports Exchange organization backups.
Product: Veeam Backup & Replication, Veeam Backup for Microsoft 365
Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
This cmdlet provides the following parameter sets:
-
ItemsParameterSet
|
Export-VEXItem -Item <VEXItem[]> -To <String> [-PstSizeLimit <UInt64>] [-Force] [<CommonParameters>] |
-
FolderParameterSet
|
Export-VEXItem -Folder <VEXFolder> -To <String> [-PstSizeLimit <UInt64>] [-Force] [-ContentKeyword <String[]>] [<CommonParameters>] |
-
MailboxParameterSet
|
Export-VEXItem -Mailbox <VEXMailbox> -To <String> [-PstSizeLimit <UInt64>] [-Force]
[-ContentKeyword <String[]>] [<CommonParameters>] |
-
DatabaseParameterSet
|
Export-VEXItem -Database <VEXDatabase[]> -To <String> [-PstSizeLimit <UInt64>] [-Force]
[-ContentKeyword <String[]>] [<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).
Note |
|
Consider the following:
- Before running this cmdlet, you must first start a restore session. For more information on how to start a restore session, see
Start-VBOExchangeItemRestoreSessionStarts restore sessions to explore backed-up Microsoft Exchange items and to perform operations with these items. or Start-VBRExchangeItemRestoreSessionStarts restore sessions to explore backed-up Exchange databases and to perform operations with these databases..
- If you start a restore session for Veeam Backup for Microsoft 365, the report about export operations will only be sent to the user account provided in Veeam Explorer for Microsoft Exchange email settings. For more information, see
Set-VEXMailSettingsModifies Veeam Explorer for Microsoft Exchange email settings. Veeam Explorer for Microsoft Exchange uses these settings to send Exchange items that are located in a backup by email and deliver export reports..
- 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
Parameters
|
Parameter
|
Description
|
Type
|
Required
|
Position
|
Accept Pipeline Input
|
|
ContentKeyword
|
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.
|
String[]
|
False
|
Named
|
False
|
|
Database
|
Specifies an array of Exchange organization mailbox databases. The cmdlet will export these databases.
Accepts the VEXDatabase[] object. To get this object, run the Get-VEXDatabaseReturns Microsoft Exchange mailbox databases. cmdlet.
|
VEXDatabase[]
|
True
|
Named
|
True (ByValue)
|
|
Folder
|
Specifies a folder of an Exchange organization mailbox. The cmdlet will export this folder with all its subfolders.
Accepts the VEXFolder object. To get this object, run the Get-VEXFolderReturns folders added to Microsoft Exchange mailboxes. cmdlet.
|
VEXFolder
|
True
|
Named
|
True (ByValue)
|
|
Force
|
Defines that the cmdlet will perform export operations without notifying the user.
Default: False
|
SwitchParameter
|
False
|
Named
|
False
|
|
Item
|
Specifies items of an Exchange organization mailbox. The cmdlet will export these items.
Accepts the VEXItem[] object. To get this object, run the Get-VEXItemReturns items added to Microsoft Exchange mailboxes. cmdlet.
|
VEXItem[]
|
True
|
Named
|
True (ByValue)
|
|
Mailbox
|
Specifies an Exchange organization mailbox that you want to export.
Accepts the VEXMailbox object. To get this object, run the Get-VEXMailboxReturns Microsoft Exchange mailboxes. cmdlet.
|
VEXMailbox
|
True
|
Named
|
True (ByValue)
|
|
PstSizeLimit
|
Specifies the size limit of the exported PST file in GB. The value must be between 1 GB and 49 GB.
If the data you want to export exceeds the specified size limit, Veeam Explorer for Microsoft Exchange will create multiple PST files.
|
UInt64
|
False
|
Named
|
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 does not 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.
|
String
|
True
|
Named
|
False
|
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Learn.
Examples
Example 1. Exporting Mailbox Items [For Veeam Backup & Replication]
|
This example shows how to export mailbox items. The cmdlet will export items with the following settings:
- The cmdlet will export items that contain the
smith keyword.
- The cmdlet will export items from the
Contacts folder to the Smith Contacts.pst file.
|
$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"
$smith = Get-VEXItem -Folder $contacts -Query "smith"
Export-VEXItem -Item $smith -To "C:\North Backup\Sales\Contacts\Smith\Smith Contacts.pst" |
Perform the following steps:
- Get items with names containing the “
smith” keyword from the Contacts folder:
- Run the
Get-VBRExchangeItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft Exchange databases. cmdlet. Save the result to the $session variable.
- Run the
Get-VEXDatabaseReturns Microsoft Exchange mailbox databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
- Run the
Get-VEXMailboxReturns Microsoft Exchange mailboxes. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
- Run the
Get-VEXFolderReturns folders added to Microsoft Exchange mailboxes. cmdlet. Set the $salesmailbox variable as the Mailbox parameter value. Specify the Name parameter value. Save the result to the $contacts variable.
- Run the
Get-VEXItemReturns items added to Microsoft Exchange mailboxes. cmdlet. Set the $contacts variable as the Folder parameter value. Specify the Query parameter value. Save the result to the $smith variable.
- Run the
Export-VEXitem cmdlet. Set the $smith variable as the Item parameter value. Specify the To parameter value.
|
Example 2. Exporting Mailbox Folder [For Veeam Backup & Replication]
|
This example shows how to export the Contacts folder to the Contacts.pst file.
|
$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"
Export-VEXItem -Folder $contacts -To "C:\North Backup\Sales\Contacts\Contacts.pst" |
Perform the following steps:
- Get the mailbox folder:
- Run the
Get-VBRExchangeItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft Exchange databases. cmdlet. Save the result to the $session variable.
- Run the
Get-VEXDatabaseReturns Microsoft Exchange mailbox databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
- Run the
Get-VEXMailboxReturns Microsoft Exchange mailboxes. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
- Run the
Get-VEXFolderReturns folders added to Microsoft Exchange mailboxes. cmdlet. Set the $salesmailbox variable as the Mailbox parameter value. Specify the Name parameter value. Save the result to the $contacts variable.
- Run the
Export-VEXitem cmdlet. Set the $contacts variable as the Folder parameter value. Specify the To parameter value.
|
Example 3. Exporting Mailbox [For Veeam Backup & Replication]
|
This example shows how to export the sales mailbox to the Sales.pst file.
|
$session = Get-VBRExchangeItemRestoreSession
$database = Get-VEXDatabase -Session $session -Name "DB_0754907780.edb"
$salesmailbox = Get-VEXMailbox -Database $database -Name "sales"
Export-VEXItem -Mailbox $salesmailbox -To "C:\North Backup\Sales\Sales.pst" |
Perform the following steps:
- Get the
sales mailbox:
- Run the
Get-VBRExchangeItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft Exchange databases. cmdlet. Save the result to the $session variable.
- Run the
Get-VEXDatabaseReturns Microsoft Exchange mailbox databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
- Run the
Get-VEXMailboxReturns Microsoft Exchange mailboxes. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
- Run the
Export-VEXitem cmdlet. Set the $salesmailbox variable as the Mailbox parameter value. Specify the To parameter value.
|
Example 4. Exporting Database [For Veeam Backup & Replication]
|
This example shows how to export the DB_0754907780.edb mailbox database to the DB_0754907780.pst file.
|
$session = Get-VBRExchangeItemRestoreSession
$database = Get-VEXDatabase -Session $session -Name "DB_0754907780.edb"
Export-VEXItem -Database $database -To "C:\Backup\DB_0754907780.pst" |
Perform the following steps:
- Get the mailbox database:
- Run the
Get-VBRExchangeItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft Exchange databases. cmdlet. Save the result to the $session variable.
- Run the
Get-VEXDatabaseReturns Microsoft Exchange mailbox databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
- Run the
Export-VEXitem cmdlet. Set the $database variable as the Database parameter value. Specify the To parameter value.
|
Example 5. Exporting Mailbox Items [For Veeam Backup for Microsoft 365]
|
This example shows how to export mailbox items. The cmdlet will export items with the following settings:
- The cmdlet will export items that contain the “
smith” keyword.
- The cmdlet will export items from the
Contacts folder to the Smith Contacts.pst.
|
$session = Get-VBOExchangeItemRestoreSession
$database = Get-VEXDatabase -Session $session -Name "support3backup*"
$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" |
Perform the following steps:
- Get items with names containing “
smith” from the Contacts folder:
- Run the
Get-VBOExchangeItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft Exchange items. cmdlet. Save the result to the $session variable.
- Run the
Get-VEXDatabaseReturns Microsoft Exchange mailbox databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $database variable.
- Run the
Get-VEXMailboxReturns Microsoft Exchange mailboxes. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $mailbox variable.
- Run the
Get-VEXFolderReturns folders added to Microsoft Exchange mailboxes. cmdlet. Set the $mailbox variable as the Mailbox parameter value. Specify the Name parameter value. Save the result to the $contacts variable.
- Run the
Get-VEXItemReturns items added to Microsoft Exchange mailboxes. cmdlet. Set the $contacts variable as the Folder parameter value. Specify the Query parameter value. Save the result to the $smith variable.
- Run the
Export-VEXitem cmdlet. Set the $smith variable as the Item parameter value. Specify the To parameter value.
|
Example 6. Exporting Mailbox Folder [For Veeam Backup for Microsoft 365]
|
This example shows how to export the Contacts folder to the Contacts.pst file.
|
$session = Get-VBOExchangeItemRestoreSession
$database = Get-VEXDatabase -Session $session -Name "support3backup*"
$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" |
Perform the following steps:
- Get the
Contacts mailbox folder:
- Run the
Get-VBOExchangeItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft Exchange items. cmdlet. Save the result to the $session variable.
- Run the
Get-VEXDatabaseReturns Microsoft Exchange mailbox databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $database variable.
- Run the
Get-VEXMailboxReturns Microsoft Exchange mailboxes. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
- Run the
Get-VEXFolderReturns folders added to Microsoft Exchange mailboxes. cmdlet. Set the $salesmailbox variable as the Mailbox parameter value. Specify the Name parameter value. Save the result to the $contacts variable.
- Run the
Export-VEXitem cmdlet. Set the $contacts variable as the Folder parameter value. Specify the To parameter value.
|
Example 7. Exporting Mailbox [For Veeam Backup for Microsoft 365]
|
This example shows how to export the sales mailbox to the Sales.pst file.
|
$session = Get-VBOExchangeItemRestoreSession
$database = Get-VEXDatabase -Session $session -Name "support3backup*"
$salesmailbox = Get-VEXMailbox -Database $database -Name "sales"
Export-VEXItem -Mailbox $salesmailbox -To "C:\North Backup\Sales\Sales.pst" |
Perform the following steps:
- Get the
sales mailbox:
- Run the
Get-VBOExchangeItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft Exchange items. cmdlet. Save the result to the $session variable.
- Run the
Get-VEXDatabaseReturns Microsoft Exchange mailbox databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $database variable.
- Run the
Get-VEXMailboxReturns Microsoft Exchange mailboxes. cmdlet. Set the $database variable as the Database parameter value. Specify the Name parameter value. Save the result to the $salesmailbox variable.
- Run the
Export-VEXitem cmdlet. Set the $salesmailbox variable as the Mailbox parameter value. Specify the To parameter value.
|
Example 8. Exporting Mailbox Database [For Veeam Backup for Microsoft 365]
|
This example shows how to export a mailbox database to the North.pst file on the machine where the PowerShell session is running.
|
$session = Get-VBOExchangeItemRestoreSession
$database = Get-VEXDatabase -Session $session -Name "support3backup*"
Export-VEXItem -Database $database -To "C:\North Backup\North.pst" |
Perform the following steps:
- Get the mailbox database:
- Run the
Get-VBOExchangeItemRestoreSessionReturns active restore sessions started to perform operations with backed-up Microsoft Exchange items. cmdlet. Save the result to the $session variable.
- Run the
Get-VEXDatabaseReturns Microsoft Exchange mailbox databases. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Use the * wildcard character to substitute the timestamp. Save the result to the $database variable.
- Run the
Export-VEXitem cmdlet. Set the $database variable as the Database parameter value. Specify the To parameter value.
|
Related Commands