Maintain control of your Microsoft 365 data
habibalby
Veteran
Posts: 392 Liked: 33 times
Joined: Jul 18, 2011 9:30 am
Full Name: Hussain Al Sayed
Location: Bahrain
Contact:
Post
by habibalby » Dec 19, 2018 12:46 pm
this post
Hello,
Following this thread which is answered by Marked and Polina;
post304247.html?hilit=Powershell%20Set% ... em#p304247
I would like to modify couple of backup-items for multiple mailboxes within a Backup Job.
Code: Select all
$org=Get-VBOOrganization
$Repo = Get-VBORepository -Name "VeeamO365-IBM"
$usernames = Get-Content -Path C:\Scripts\Users.txt
$Users=Get-VBOOrganizationUser -Organization $org| ?{$usernames.Contains($_.UserName)}
ForEach ($User in $Users)
{
Get-VBOOrganizationUser -Name $User -Organization $org
$backupItemUser = New-VBOBackupItem -User $users -Mailbox:$True -ArchiveMailbox:$False -OneDrive:$False
Set-VBOBackupItem -BackupItem $backupItemUser
}
Any help much appreciated.
Regards,
whimark
Influencer
Posts: 18 Liked: 5 times
Joined: May 14, 2018 11:54 am
Full Name: Markus Johansson
Location: Gothenburg
Contact:
Post
by whimark » Dec 19, 2018 1:34 pm
1 person likes this post
Its not very logical but you should use the add-vbobackupitem command to update a user, or group, in a job. That is how I update my users and groups if needed
Code: Select all
$org=Get-VBOOrganization
$Repo = Get-VBORepository -Name "VeeamO365-IBM"
$usernames = Get-Content -Path C:\Scripts\Users.txt
$Users=Get-VBOOrganizationUser -Organization $org| ?{$usernames.Contains($_.UserName)}
$job = get-vbojob -name "xxxxxxxxxxx"
ForEach ($User in $Users)
{
Get-VBOOrganizationUser -Name $User -Organization $org
$backupItemUser = New-VBOBackupItem -User $users -Mailbox:$True -ArchiveMailbox:$False -OneDrive:$False
Add-VBOBackupItem -Job $job -BackupItem $backupItemUser
}
habibalby
Veteran
Posts: 392 Liked: 33 times
Joined: Jul 18, 2011 9:30 am
Full Name: Hussain Al Sayed
Location: Bahrain
Contact:
Post
by habibalby » Dec 19, 2018 2:40 pm
this post
Hi Mark,
Thank you once again for your help.. I will try it tomorrow and keep you posted.
Regards,
Polina
Veeam Software
Posts: 3191 Liked: 774 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:
Post
by Polina » Dec 21, 2018 3:28 pm
1 person likes this post
@Markus, thank you for your assistance!
@Hussain, any success with modifying the jobs? Does it work for you now?
habibalby
Veteran
Posts: 392 Liked: 33 times
Joined: Jul 18, 2011 9:30 am
Full Name: Hussain Al Sayed
Location: Bahrain
Contact:
Post
by habibalby » Dec 24, 2018 6:35 am
this post
Hi Polina & Markus,
Much appreciated, it worked..
Regards,
Users browsing this forum: Polina and 12 guests