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

Get-VEODDocument

Short Description

Returns OneDrive documents.

Syntax

This cmdlet provides 2 parameter sets.

  • For getting documents of the specified user:

Get-VEODDocument [-User] <VBOOneDriveUser> [-Name <string[]>] [-Recurse]  [<CommonParameters>]

  • For getting all children documents of the specified document:

Get-VEODDocument [-ParentDocument] <VBOOneDriveDocument> [-Name <string[]>] [-Recurse]  [<CommonParameters>]

Detailed Description

This cmdlet returns documents that are stored on OneDrive repository.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

User

Specifies the name of the OneDrive user. This cmdlet will return OneDrive user with the specified name.

True

0

True (ByValue)

False

Name

Specifies the name of the document. The cmdlet will return the document with this name.

False

Named

False

True

ParentDocument

Specifies the parent document. The cmdlet will return the child documents of this parent document.

True

0

True (ByValue)

False

Recurse

Indicates that the cmdlet will return documents from all subfolders of the specified folder.

False

Named

False

False

<CommonParameters>

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

Example 1

This example shows how to get a document with the name "document.txt" with all of its children from 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 children.

PS C:\PS> $session = Get-VEODRestoreSession

PS C:\PS> $user = Get-VEODUser -Session $session -Name “userAlpha”

PS C:\PS> Get-VEODDocument -User $user -Name “document.txt” -Recurse

Example 2

This example shows how to get the subfolders under the parent folder with the name "folder":

  1. Run Get-VEODRestoreSession to get the active restore session. Save the result to the $session variable.
  2. Run Get-VEODUser with the $user variable to get the user. Save the result to the $user variable.
  3. Run Get-VEODDocument with the $folder variable and Name parameter to get the specific folder from the specified user.
  4. Run Get-VEODDocument with the $folder variable and ParentDocument and Recurse parameters to get all of the child documents to the $folder.

PS C:\PS> $session = Get-VEODRestoreSession

PS C:\PS> $user = Get-VEODUser -Session $session -Name “userAlpha”

PS C:\PS> $folder = Get-VEODDocument -User $user -Name “folder”

PS C:\PS> Get-VEODDocument -ParentDocument $folder -Name “document.txt” -Recurse

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference