Help Center
Choose product document...
Veeam Backup for Microsoft Office 365 2.0
PowerShell Reference

Save-VEODDocument

Short Description

Saves OneDrive documents.

Syntax

This cmdlet provides 2 parameter sets.

  • For saving documents of a specific OneDrive user:

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

  • For saving a specific OneDrive document:

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

  • For saving 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
Pipeline
Input

Accept
Wildcard
Characters

Document

Specifies 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 where to save the selected OneDrive document.

True

1

False

False

User

Specifies 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 about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Example 1

This example shows how to save all OneDrive documents from the user with the name "userAlpha".

  1. Run Get-VEODRestoreSession to get the active restore session. Save the result to the $session variable.
  2. Run Get-VEODUser with the $session variable to get the user. Save the result to the $user variable.
  3. Run Save-VEODDocument with the $user variable and a path where to save the selected documents. Use AsZip parameter to save all the documents as a single zip archive.

PS C:\PS> $session = Get-VEODRestoreSession

PS C:\PS> $user = Get-VEODUser -Session $session -Name “userAlpha”

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

Example 2

This example shows how to save a specific OneDrive document with the name "document.txt" from the user with the name "userAlpha":

  1. Run Get-VEODRestoreSession to get the active restore session. Save the result to the $session variable.
  2. Run Get-VEODUser with the $session variable to get the user. Save the result to the $user variable.
  3. Run Get-VEODDocument 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.
  4. Run Save-VEODDocument with the $user variable and a path where to save the selected documents. Use AsZip parameter to save all the documents as a single zip archive.

PS C:\PS> $session = Get-VEODRestoreSession

PS C:\PS> $user = Get-VEODUser -Session $session -Name “userAlpha”

PS C:\PS> $document = Get-VEODDocument -User $user -Name “document.txt” -Recurse

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

Example 3

This example shows how to save OneDrive documents from the multiple users:

  1. Run Get-VEODRestoreSession to get the active restore session. Save the result to the $session variable.
  2. Run Get-VEODUser with the $session variable to get the users. Save the result to the $users variable.
  3. Run Save-VEODDocument with the $users variable and a path where to save the selected documents. Use AsZip parameter to save all the documents as a single zip archive.

PS C:\PS> $session = Get-VEODRestoreSession

PS C:\PS> $users = Get-VEODUser -Session $session

PS C:\PS> Save-VEODDocument -MultipleUsers $users -Path "C:\Save\archive.zip" -AsZip

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference