Maintain control of your Microsoft 365 data
Post Reply
dkar
Lurker
Posts: 2
Liked: never
Joined: Jul 11, 2023 6:38 am
Contact:

Extract files from Veeam 365 SPO backup using PowerShell

Post by dkar »

Hi, Veeam team!

Can I use PowerShell to extract files from a SharePoint Online document library backup that was created with Microsoft 365 Community Edition?
I've had a look at the PowerShell reference for M365 and there's nothing similar...
https://helpcenter.veeam.com/docs/vbo36 ... tml?ver=70
Mildur
Product Manager
Posts: 8735
Liked: 2296 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Extract files from Veeam 365 SPO backup using PowerShell

Post by Mildur »

Hello dkar

Welcome to the forum.

To start the restore session, use that command:
https://helpcenter.veeam.com/docs/backu ... ml?ver=120

Code: Select all

Start-VBOSharePointItemRestoreSession
Then use the following command to save the documents or library on your local disk.
Have a look at example 6 for a single document. Or Example 4 for the entire library.

https://helpcenter.veeam.com/docs/backu ... ml?ver=120

Code: Select all

Save-VESPItem

Best,
Fabian
Product Management Analyst @ Veeam Software
dkar
Lurker
Posts: 2
Liked: never
Joined: Jul 11, 2023 6:38 am
Contact:

Re: Extract files from Veeam 365 SPO backup using PowerShell

Post by dkar »

Thanks Fabian!

These examples were helpful.
My final code:

Code: Select all

$organization = Get-VBOOrganization -Name "dkar.onmicrosoft.com"
Start-VBOSharePointItemRestoreSession -LatestState -Organization $organization
$session = Get-VBOSharePointItemRestoreSession
$organization = Get-VESPOrganization -Session $session  
$site = Get-VESPSite -Organization $organization -Name "Dkar Company"
$documentLibrary = Get-VESPDocumentLibrary -Site $site -Name "Docs"
Save-VESPItem -DocumentLibrary $documentLibrary -Path "d:\spo\bacup" -Force
Stop-VBRSharePointItemRestoreSession $session
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests