---
title: "Get-VEODDocument"
description: "Returns OneDrive documents. Product: Veeam Backup for Microsoft 365 Product Edition: Community, Rental License, Subscription License This cmdlet provides the following parameter sets: This cmdlet returns documents that are stored in the OneDrive repo"
canonical: "https://helpcenter.veeam.com/docs/vbr/explorers_powershell/get-veoddocument.html"
breadcrumb: "Veeam Explorers PowerShell Reference > Veeam Explorers PowerShell Reference > Veeam Explorer for Microsoft OneDrive > Get-VEODDocument"
dateModified: "2026-08-18"
---
# Get-VEODDocument
## Short Description
Returns OneDrive documents.
**Product**: Veeam Backup for Microsoft 365
**Product Edition**: Community, Rental License, Subscription License
## Syntax
This cmdlet provides the following parameter sets:
-
User
```
Get-VEODDocument [-User] [-Name ] [-Recurse] []
```
-
Document
```
Get-VEODDocument [-ParentDocument] [-Name ] [-Recurse] []
```
## Detailed Description
This cmdlet returns documents that are stored in the OneDrive repository.
## Parameters
|
Parameter
|
Description
|
Type
|
Required
|
Position
|
Accept Pipeline Input
|
|
Name
|
Specifies an array of document names. The cmdlet will return an array of documents with these names. This parameter accepts wildcard characters.
|
String[]
|
False
|
Named
|
False
|
|
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.
|
VBOOneDriveDocument
|
True
|
0
|
True (ByValue)
|
|
Recurse
|
Defines that the cmdlet will return all child items of the specified parent item. Default: False
|
SwitchParameter
|
False
|
Named
|
False
|
|
User
|
Specifies 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.
|
VBOOneDriveUser
|
True
|
0
|
True (ByValue)
|
``
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the [About Common Parameters](http://go.microsoft.com/fwlink/p/?LinkID=113216) section of Microsoft Docs.
## Output Object
The cmdlet returns the [`VBOOneDriveDocument`](vboonedrivedocument.md) object that contains documents that are stored in the OneDrive repository.
## Examples
::: example
### Example 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`](get-veodrestoresession.md) cmdlet. Save the result to the `$session` variable.
2. Run the [`Get-VEODUser`](get-veoduser.md) 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.
:::
::: example
### Example 2. Getting Specific Child Documents
This example shows how to get child documents from the `Document` parent document.
```
$session = Get-VEODRestoreSession
$user = Get-VEODUser -Session $session -Name "userAlpha"
$document = Get-VEODDocument -User $user -Name "Document"
Get-VEODDocument -ParentDocument $document -Name "document.txt" -Recurse
```
Perform the following steps:
1. Run the [`Get-VEODRestoreSession`](get-veodrestoresession.md) cmdlet. Save the result to the `$session` variable.
2. Run the [`Get-VEODUser`](get-veoduser.md) 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 `$document` variable.
4. Run the `Get-VEODDocument` cmdlet. Specify the following settings:
- Set the `$document` variable as the `ParentDocument` parameter value.
- Specify the `Name` parameter value.
- Provide the `Recurse` parameter.
:::
## Related Commands
- [`Get-VEODRestoreSession`](get-veodrestoresession.md)
- [`Get-VEODUser`](get-veoduser.md)