Save-VEODDocument
Short Description
Saves 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:
- To save documents of a specific OneDrive user:
Save-VEODDocument [-User] <VBOOneDriveUser> [-Path] <string> [-AsZip] [<CommonParameters>] |
- To save a specific OneDrive document:
Save-VEODDocument [-Document] <VBOOneDriveDocument[]> [-Path] <string> [-AsZip] [<CommonParameters>] |
- To save documents of the multiple OneDrive users:
Save-VEODDocument [-MultipleUsers] <VBOOneDriveUser[]> [-Path] <string> [-AsZip] [<CommonParameters>] |
Detailed Description
This cmdlet saves OneDrive documents.
Parameters
Parameter | Description | Required | Position | Accept | Accept |
Document | Specifies the OneDrive document that you want to save. | True | 0 | True (ByValue) | False |
AsZip | Indicates that the cmdlet will save the specified document as ZIP-archive. | False | Named | False | False |
Path | Specifies a path to the folder. The cmdlet will save the OneDrive document to the specified path. | True | 1 | False | False |
User | Specifies the OneDrive user that the cmdlet will save documents from. | True | 0 | True (ByValue) | False |
MultipleUsers | Specifies OneDrive users that the cmdlet will save documents from. | True | 0 | True (ByValue) | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Example 1
This example shows how to save all OneDrive documents from the userAlpha user.
- Run the Get-VEODRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
- Run the Get-VEODUser cmdlet with the $session variable to get the user. Save the result to the $user variable.
- Run the Save-VEODDocument cmdlet with the $user variable. Use the Path parameter to specify the path to the folder where you want to keep the selected documents. Use the AsZip parameter to save all documents as a single zip archive.
$session = Get-VEODRestoreSession $user = Get-VEODUser -Session $session -Name “userAlpha” Save-VEODDocument -User $user -Path "C:\Save\archive.zip" -AsZip |
Example 2
This example shows how to save the document.txt OneDrive document from the userAlpha user.
- Run the Get-VEODRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
- Run the Get-VEODUser cmdlet with the $session variable to get the OneDrive user. Save the result to the $user variable.
- Run the Get-VEODDocument cmdlet 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.
- Run the Save-VEODDocument cmdlet with the $document variable. Use the Path parameter to specify the path to the folder where you want to keep the selected documents. Use the AsZip parameter to save all documents as a single zip archive.
$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 |
Example 3
This example shows how to save OneDrive documents from multiple users:
- Run the Get-VEODRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
- Run the Get-VEODUser cmdlet with the $session variable to get the OneDrive users. Save the result to the $users variable.
- Run the Save-VEODDocument cmdlet with the $users variable. Use the Path parameter to specify the path to the folder where you want to keep the selected documents. Use the AsZip parameter to save all documents as a single zip archive.
$session = Get-VEODRestoreSession $users = Get-VEODUser -Session $session Save-VEODDocument -MultipleUsers $users -Path "C:\Save\archive.zip" -AsZip |
Related Commands