Help Center
Choose product document...
Veeam Backup for Microsoft Office 365 3.0
PowerShell Reference

Send-VEODDocument

Short Description

Sends OneDrive documents via e-mail.

Syntax

This cmdlet provides 2 parameter sets.

  • For sending a specific OneDrive document:

Send-VEODDocument [-Document] <VBOOneDriveDocument[]> -To <string> [-From <string>] [-Subject <string>] [-Text <string>]  [<CommonParameters>]

  • For sending documents of a specific OneDrive user:

Send-VEODDocument [-User] <VBOOneDriveUser> -To <string> [-From <string>] [-Subject <string>] [-Text <string>]  [<CommonParameters>]

Detailed Description

This cmdlet sends OneDrive documents as attachments to e-mails.

Send-VEODDocument Note:

Before sending restored OneDrive data, check the following prerequisites:

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Document

Specifies OneDrive document that you want to send in the e-mail message.

True

0

True (ByValue)

False

From

Specifies the e-mail address from which Veeam Explorer for OneDrive will send restored OneDrive data.

This e-mail address must have the rights to connect to SMTP server if SMTP server requires authentication.

If you do not provide this parameter, Veeam Explorer for Microsoft OneDrive will use the e-mail address, specified in SMTP settings. To learn more, see Set-VEODSmtpSettings.

False

Named

False

False

To

Specifies the e-mail address to which Veeam Explorer for OneDrive will send restored data.

True

Named

False

False

Subject

Specifies the subject of the e-mail message.

False

Named

False

False

Text

Specifies the body of the e-mail message.

False

Named

False

False

User

Specifies the name of the OneDrive user. This cmdlet will send OneDrive document of this user.

True

0

True (ByValue)

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Example 1

This example shows how to send a specific OneDrive document with the name "document.txt" that belongs to the user with the name "userAlpha":

  1. Run Get-VEODRestoreSession to get the active restore session. Save the result to the $session variable.
  2. Run Get-VEODUser with the $session variable to get the user. Save the result to the $user variable.
  3. Run Get-VEODDocument with the $user variable and Name parameter to get the specific OneDrive document. Use the Recurse parameter to also get all of its child versions.
  4. Run Send-VEODDocument with the $document variable and the To parameter to specify the e-mail where to send the selected document. Use Subject and Text parameters to write a subject and a text of the letter.

$session = Get-VEODRestoreSession

$user = Get-VEODDriveUser -Session $session -Name “userAlpha”

$document = Get-VEODDocument -User $user -Name “document.txt” -Recurse

Send-VEODDocument -Document $document -To user.Alpha@mail.com -Subject "Subject" -Text "Mail text"

Example 2

This example shows how to send a specific OneDrive document with the name "document.txt" that belongs to the user with the name "userAlpha":

  1. Run Get-VEODRestoreSession to get the active restore session. Save the result to the $session variable.
  2. Run Get-VEODUser with the $session variable to get the user. Save the result to the $user variable.
  3. Run Get-VEODDocument with the $user variable and Name parameter to get the specific OneDrive document. Use the Recurse parameter to also get all of its child versions.
  4. Run Send-VEODDocument with the $document variable and the To parameter to specify the e-mail where to send the selected document. Use Subject and Text parameters to write a subject and a text of the letter.

$session = Get-VEODRestoreSession

$user = Get-VEODUser -Session $session -Name “userAlpha”

Send-VEODDocument -User $user -To user.Alpha@mail.com -Subject "Subject" -Text "Mail text"

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference