Save-VEODDocument
Short Description
Saves OneDrive documents.
Product: Veeam Backup for Microsoft 365
Product Edition: Community, Rental License, Subscription License
Syntax
This cmdlet provides the following parameter sets:
-
Document
|
Save-VEODDocument [-Document] <VBOOneDriveDocument[]> [-Path] <String> [-AsZip] [<CommonParameters>] |
-
User
|
Save-VEODDocument [-User] <VBOOneDriveUser> [-Path] <String> [-AsZip] [<CommonParameters>] |
-
MultipleUser
|
Save-VEODDocument [-MultipleUsers] <VBOOneDriveUser[]> [-Path] <String> [-AsZip] [<CommonParameters>] |
Detailed Description
This cmdlet saves OneDrive documents.
Parameters
Parameters
|
Parameter
|
Description
|
Type
|
Required
|
Position
|
Accept Pipeline Input
|
|
AsZip
|
Defines that the cmdlet will save the specified document as a ZIP archive.
Default: False
|
SwitchParameter
|
False
|
Named
|
False
|
|
Document
|
Specifies an array of OneDrive documents that you want to save.
Accepts the VBOOneDriveDocument[] object. To get this object, run the Get-VEODDocumentReturns OneDrive documents. cmdlet.
|
VBOOneDriveDocument[]
|
True
|
0
|
True (ByValue)
|
|
MultipleUsers
|
Specifies an array of OneDrive users. The cmdlet will save documents of the specified users.
Accepts the VBOOneDriveUser[] object. To get this object, run the Get-VEODUserReturns OneDrive users. cmdlet.
|
VBOOneDriveUser[]
|
True
|
0
|
True (ByValue)
|
|
Path
|
Specifies a path to the folder. The cmdlet will save the OneDrive document to the specified path.
|
String
|
True
|
1
|
False
|
|
User
|
Specifies OneDrive user. The cmdlet will save documents of this user.
Accepts the VBOOneDriveUser object. To get this object, run the Get-VEODUserReturns OneDrive users. cmdlet.
|
VBOOneDriveUser
|
True
|
0
|
True (ByValue)
|
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Learn.
Examples
Example 1: Saving OneDrive Document of Specific User
|
This example shows how to save all OneDrive documents of the userAlpha user to the ZIP archive file.
|
$session = Get-VEODRestoreSession
$user = Get-VEODUser -Session $session -Name "userAlpha"
Save-VEODDocument -User $user -Path "C:\Save\archive.zip" -AsZip |
Perform the following steps:
- Run the
Get-VEODRestoreSessionReturns active restore sessions started to perform operations with backed-up OneDrive items. cmdlet. Save the result to the $session variable.
- Run the
Get-VEODUserReturns OneDrive users. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $user variable.
- Run the
Save-VEODDocument cmdlet. Set the $user variable as the User parameter value. Specify the Path parameter value. Provide the AsZip parameter.
|
Example 2: Saving Specific OneDrive Document
|
This example shows how to save the document.txt OneDrive document from the userAlpha user.
|
$session = Get-VEODRestoreSession
$user = Get-VEODUser -Session $session -Name "userAlpha"
$document = Get-VEODDocument -User $user -Name "document.txt" -Recurse
Save-VEODDocument -Document $document -Path "C:\Save\archive.zip" -AsZip |
Perform the following steps:
- Run the
Get-VEODRestoreSessionReturns active restore sessions started to perform operations with backed-up OneDrive items. cmdlet. Save the result to the $session variable.
- Run the
Get-VEODUserReturns OneDrive users. cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $user variable.
- Run the
Get-VEODDocumentReturns OneDrive documents. cmdlet. Set the $user variable as the User parameter value. Specify the Name parameter value. Provide the Recurse parameter. Save the result to the $document variable.
- Run the
Save-VEODDocument cmdlet. Set the $document variable as the Document parameter value. Specify the Path parameter value. Provide the AsZip parameter.
|
Example 3: Saving Documents of Multiple OneDrive Users
|
This example shows how to save OneDrive documents from multiple users.
|
$session = Get-VEODRestoreSession
$users = Get-VEODUser -Session $session
Save-VEODDocument -MultipleUsers $users -Path "C:\Save\archive.zip" -AsZip |
Perform the following steps:
- Run the
Get-VEODRestoreSessionReturns active restore sessions started to perform operations with backed-up OneDrive items. cmdlet. Save the result to the $session variable.
- Run the
Get-VEODUserReturns OneDrive users. cmdlet. Set the $session variable as the Session parameter value. Save the result to the $users variable.
- Run the
Save-VEODDocument cmdlet. Set the $users variable as the MultipleUsers parameter value. Specify the Path parameter value. Provide the AsZip parameter.
|
Related Commands