Send-VEXItem
Sends Exchange mailbox items as attachments to emails.
Veeam Backup & Replication, Veeam Backup for Microsoft 365
Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License
Send-VEXItem [-Item] <VEXItem[]> [-From <String>] -To <String> [-Subject <String>] [-Body <String>] [-Force] [<CommonParameters>] |
This cmdlet sends Exchange mailbox items as attachments to emails.
Note |
Before sending Exchange mailbox items, you must perform the following actions: |
Parameter | Description | Type | Required | Position | Accept Pipeline Input |
---|
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-VEXItem cmdlet. | True | 0 | True (ByValue) |
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 |
To | Specifies an email address to which Veeam Explorer for Microsoft Exchange will send restored mailbox data. | String | True | Named | False |
Subject | Specifies a subject of an email message. | String | False | Named | False |
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 |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
None.
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-VBRExchangeItemRestoreSession cmdlet. Save the result to the $session variable.
- 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.
- 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.
- Run the Get-VEXFolder cmdlet. Set the $mailbox variable as the Mailbox parameter value. Save the result to the $contacts variable.
- Run the Get-VEXitem 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.
|
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-VBOExchangeItemRestoreSession cmdlet. Save the result to the $session variable.
- Run the Get-VEXDatabase 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-VEXMailbox 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-VEXFolder cmdlet. Set the $mailbox variable as the Mailbox parameter value. Save the result to the $contacts variable.
- Run the Get-VEXitem 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