This is an archive version of the document. To get the most up-to-date information, see the current version.

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:

  • Save documents of a specific OneDrive user.

Save-VEODDocument [-User] <VBOOneDriveUser> [-Path] <string> [-AsZip]  [<CommonParameters>]

  • Save a specific OneDrive document.

Save-VEODDocument [-Document] <VBOOneDriveDocument[]> [-Path] <string> [-AsZip]  [<CommonParameters>]

  • 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

Type

Required

Position

Accept Pipeline Input

User

Specifies the OneDrive user that the cmdlet will save documents from.

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

True

0

True (ByValue)

Document

Specifies an array of OneDrive documents that you want to save.

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

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-VEODUser cmdlet.

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

AsZip

Defines that the cmdlet will save the specified document as ZIP-archive.

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.

Examples

Example 1. Saving OneDrive Document of Specific User

This example shows how to save all OneDrive documents of the userAlpha user.

$session = Get-VEODRestoreSession

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

Save-VEODDocument -User $user -Path "C:\Save\archive.zip" -AsZip

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 Save-VEODDocument cmdlet. Set the $user variable as the User parameter value. Specify the Path parameter value. Provide the AsZip parameter value

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:

  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 Save-VEODDocument cmdlet. Set the $user variable as the User parameter value. Specify the Name parameter value. Provide the Recurse parameter value. Save the result to the $document variable.
  4. Run the Save-VEODDocument cmdlet. Set the $document variable as the Document parameter value. Specify the Path parameter value. Provide the AsZip parameter value.

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:

  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 $users variable.
  3. Run the Save-VEODDocument cmdlet. Set the $users variable as the MultipleUsers parameter value. Specify the Path parameter value. Provide the AsZip parameter value.

Related Commands