Maintain control of your Microsoft 365 data
Post Reply
sandsturm
Veteran
Posts: 293
Liked: 25 times
Joined: Mar 23, 2015 8:30 am
Contact:

PowerShell / Rest API: Add teams chats to backup job

Post by sandsturm »

Is there an option to set the option "Chats" via API or via Powershell and not via GUI? I mean the option, which is meant in the last printscreen at the bottom of this article: https://www.veeam.com/kb4340. We use a script to add new Teams to our backupjobs and therefore I need an option to also set this "chats" option.

thx,
sandsturm

#SPLIT from Team Backup
Mildur
Product Manager
Posts: 10104
Liked: 2696 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: PowerShell / Rest API: Add Teams to backup job

Post by Mildur »

Hi Sandsturm

I have splited your question from the other topic. You can add objects to a backup job either with Teams or SharePoint.

PowerShell: Set-VBOJob
RestAPI: PUT https://localhost:4443/v7/Jobs/{jobId}

This should work for PowerShell. Please test it first with a dummy job.
Disclaimer: I tested the code with "organization" as the source object.

Code: Select all

$job = Get-VBOJob -Name "BJ-DAS-SPO"
$BackupItem = Get-VBOBackupItem -Job $job
Set-VBOBackupItem -BackupItem $BackupItem -TeamsChats:$True
Set-VBOJob -Job $job -SelectedItems $BackupItem
Image

Best,
Fabian
Product Management Analyst @ Veeam Software
sandsturm
Veteran
Posts: 293
Liked: 25 times
Joined: Mar 23, 2015 8:30 am
Contact:

Re: PowerShell / Rest API: Add teams chats to backup job

Post by sandsturm »

works like a charm

thx a lot for your help,
sandsturm
Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests