Get-VEODDocument

In this article

    Short Description

    Returns OneDrive documents.

    Applies to Veeam Backup for Microsoft Office 365

    Product Edition: Community, Rental, Subscription

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • Get documents of the specific user.

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

    • Get all child documents of the specific document.

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

    Detailed Description

    This cmdlet returns documents that are stored in the OneDrive repository.

    Parameters

    Parameter

    Description

    Type

    Required

    Position

    Accept Pipeline Input

    User

    Specifies a OneDrive user. This cmdlet will return documents of the specified OneDrive user.

    Accepts the VBOOneDriveUser object. To get this object, run the Get-VEODUser cmdlet.

    True

    0

    True (ByValue)

    ParentDocument

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

    Accepts the VBOOneDriveDocument object. To get this object, run the Get-VEODDocument cmdlet.

    True

    0

    True (ByValue)

    Name

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

    String

    False

    Named

    False

    Recurse

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

    SwitchParameter

    False

    Named

    False

    <CommonParameters>

    This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Docs.

    Output Object

    The cmdlet returns the VEODDocument object that returns documents that are stored in the OneDrive repository.

    Examples

    Get-VEODDocumentExample 1. Getting Specified User Documents

    This example shows how to get the document.txt document and its child from the userAlpha user.

    $session = Get-VEODRestoreSession

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

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

    Perform the following steps:

    1. Run the Get-VEODRestoreSession cmdlet. Save the result to the $session variable.
    2. Run the Get-VEODUser cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $user variable.
    3. Run the Get-VEODDocument cmdlet. Specify the following settings:
    • Set the $user variable as the User parameter value.
    • Specify the Name parameter value.
    • Provide the Recurse parameter value.

    Get-VEODDocumentExample 2. Getting Specific Child Documents

    This example shows how to get subfolders under the folder parent folder.

    $session = Get-VEODRestoreSession

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

    $folder = Get-VEODDocument -User $user -Name “folder”

    Get-VEODDocument -ParentDocument $folder -Name “document.txt” -Recurse

    Perform the following steps:

    1. Run the Get-VEODRestoreSession cmdlet. Save the result to the $session variable.
    2. Run the Get-VEODUser cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $user variable.
    3. Run the Get-VEODDocument cmdlet. Specify the User and Name parameters. Save the result to the $folder variable.
    4. Run the Get-VEODDocument cmdlet. Specify the following settings:
    • Set the $folder variable as the ParentDocument parameter value.
    • Specify the Name parameter value.
    • Provide the Recurse parameter value.

    Related Commands