Send-VEXItem
Short Description
Sends Exchange mailbox items as attachments to emails.
Product: Veeam Backup & Replication, Veeam Backup for Microsoft 365
Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Send-VEXItem [-Item] <VEXItem[]> [-From <String>] -To <String> [-Subject <String>] [-Body <String>] [-Force] [<CommonParameters>] |
Detailed Description
This cmdlet sends Exchange mailbox items as attachments to emails.
Note |
|
Before you send Exchange mailbox items, you must perform the following actions:
- Specify email settings for Veeam Explorer for Microsoft Exchange. For more information on how to specify email settings, 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..
- 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..
|
Parameters
Parameters
|
Parameter
|
Description
|
Type
|
Required
|
Position
|
Accept Pipeline Input
|
|
Body
|
Specifies a body of an email message.
|
String
|
False
|
Named
|
False
|
|
Force
|
Defines that the cmdlet will skip the certificate check of the recipient.
If you provide this parameter, the cmdlet will send Exchange items without checking whether the recipient certificate is valid.
Otherwise, the cmdlet will not send Exchange items if the recipient certificate validation fails.
Default: False
|
SwitchParameter
|
False
|
Named
|
False
|
|
From
|
Specifies the email address from which Veeam Explorer for Microsoft Exchange will send restored mailbox data.
If this parameter is omitted, Veeam Explorer for Microsoft Exchange will use the email address specified in the email settings.
|
String
|
False
|
Named
|
False
|
|
Item
|
Specifies items of the Exchange organization mailbox. The cmdlet will send these items as attachments to email.
Accepts the VEXItem[] object. To get this object, run the Get-VEXItemReturns items added to Microsoft Exchange mailboxes. cmdlet.
|
VEXItem[]
|
True
|
0
|
True (ByValue)
|
|
Subject
|
Specifies a subject of an email message.
|
String
|
False
|
Named
|
False
|
|
To
|
Specifies an email address to which Veeam Explorer for Microsoft Exchange will send restored mailbox data.
|
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. Sending Exchange Mailbox Items [For Veeam Backup & Replication]
|
This example shows how to send items that were restored from the Contacts folder with the following settings:
- The cmdlet will send restored items from the
admin.north@support.com to the sales.north@support.com email address.
- The subject of the email message is
Sales Contacts.
- The body of the email message is
Please find attached "North Sales" Contacts.
|
$session = Get-VBRExchangeItemRestoreSession
$database = Get-VEXDatabase -Session $session -Name "DB_0754907780.edb"
$mailbox = Get-VEXMailbox -Database $database -Name "Sales"
$contacts = Get-VEXFolder -Mailbox $mailbox
$items = Get-VEXItem -Folder $contacts -Recurse
Send-VEXItem -Item $items -From admin.north@support.com -To sales.north@support.com -Subject "Sales Contacts" -Body "Please find attached "North Sales" Contacts" |
Perform the following steps:
- Get items 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 $mailbox variable.
- Run the
Get-VEXFolderReturns folders added to Microsoft Exchange mailboxes. cmdlet. Set the $mailbox variable as the Mailbox 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. Provide the Recurse parameter. Save the result to the $items variable.
- Run the
Send-VEXItem cmdlet. Specify the following settings:
- Set the
$items variable as the Item parameter value.
- Specify the
From parameter value.
- Specify the
To parameter value.
- Specify the
Subject parameter value.
- Specify the
Body parameter value.
|
Example 2. Sending Exchange Mailbox Items [For Veeam Backup for Microsoft 365]
|
This example shows how to send items that were restored from the Contacts folder with the following settings:
- The cmdlet will send restored items from the
admin.north@support.com to the sales.north@support.com email address.
- The subject of the email message is
Sales Contacts.
- The body of the email message is
Please find attached "North Sales" Contacts.
|
$session = Get-VBOExchangeItemRestoreSession
$database = Get-VEXDatabase -Session $session[0]
$mailbox = Get-VEXMailbox -Database $database[0] -Name "sales"
$contacts = Get-VEXFolder -Mailbox $mailbox
$items = Get-VEXItem -Folder $contacts -Recurse
Send-VEXItem -Item $items -From admin.north@support.com -To sales.north@support.com -Subject "Sales Contacts" -Body "Please find attached "North Sales" Contacts" |
Perform the following steps:
- Get items 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 and specify the necessary restore session. In this example, it is the first restore session in the array. Save the result to the $database variable.
- Run the
Get-VEXMailboxReturns Microsoft Exchange mailboxes. cmdlet. Set the $database variable as the Database parameter value and select the necessary database. In this example, it is the first database in the array. 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. 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. Provide the Recurse parameter. Save the result to the $items variable.
- Run the
Send-VEXItem cmdlet. Specify the following settings:
- Set the
$items variable as the Item parameter value.
- Specify the
From parameter value.
- Specify the
To parameter value.
- Specify the
Subject parameter value.
- Specify the
Body parameter value.
|
Related Commands