Maintain control of your Microsoft 365 data
Post Reply
Aline
Lurker
Posts: 1
Liked: never
Joined: Dec 20, 2023 11:04 am
Full Name: Aida Seoane
Contact:

Exclude multiple users from all jobs

Post by Aline »

Hello, firstly apologies if this has been addressed before, but I could not find any useful information about it.

It is usually common for me to be passed lists of even 60 users to exclude from jobs. I wanted to know if there is a way to do this without having to do it one by one, job by job. Adding users to a group and excluding the whole group is not a valid option. Is there a way to do it by powershell for example?

I have seen https://helpcenter.veeam.com/docs/vbo36 ... tml?ver=70 but I don't know if it would be possible to use it in version 6 or how to apply it to users.

Thanks a lot for your help.
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Exclude multiple users from all jobs

Post by Mildur »

Hi Aida

Yes, PowerShell would be the way --> https://helpcenter.veeam.com/archive/vb ... pitem.html

With New-VBOBackupItem and Add-VBOExcludedBackupItem you can exclude a user from a job. Now you just need to adjust the following code and add a for each loop to process a list of users (imported by CSV) for every job you have.

Example for excluding a single user from a single job:

Code: Select all

$org = Get-VBOOrganization -Name "Your M365 Org"
$job = Get-VBOJob -Name "Backup Job"

$user = Get-VBOOrganizationUser -Organization $org -Username "User to Exclude in the UPN format"
$object = New-VBOBackupItem -User $user
Add-VBOExcludedBackupItem -Job $job -BackupItem $object
Let me know if you need help with the foreach loop.

Best,
Fabian
Product Management Analyst @ Veeam Software
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests