How to automate Veeam Backup and Replication Global Exclusion Lists

  • 6 November 2023
  • 6 comments
  • 146 views

Userlevel 7
Badge +17

In Veeam Backup and Replication Version 12 a global VM exclusion list was introduced. VMs added to this list are excluded from processing in all jobs.

Up to now the only way to get VMs into or out of this list was via the GUI.

In V12 you get there with “Hamburger menu” on the upper left corner --> VM Exclusions

Then this dialog appears, and you can administer the global exclusion list via the GUI

With the coming version 12.1 there will be some changes.

First will there be an additional exclusion list. You have one “Global VM Exclusions” list and one “Global Malware Exclusions” list.

You get there with “Hamburger menu” on the upper left corner --> Global Exclusions --> select one of the two exclusions lists.

 

 

Then this dialog appears (it looks the same for both exclusions lists except the window title), and you can administer the global exclusion lists via the GUI

 

 

The second new feature is that you can administer both exclusions lists via PowerShell commands. We will have a look how to achieve this…

Global VM Exclusion List

 

First you have to get one or more VM definitions with the commence Find-VBRViEntity and save the results in a variable.

PS D:\scripts\Powershell> $VM = Find-VBRViEntity -Name Test-VM-1,Test-VM-2

The content of the variable looks like this.

PS D:\scripts\Powershell> $VM

 

Now you can add one or all VMs in the variable to the Global VM Exclusions list with the command Add-VBRVMExclusion. To add a specific VM user the index of the VM inside the variable – e.g. $VM[0] for Test-VM-1

PS D:\scripts\Powershell> Add-VBRVMExclusion -Entity $VM

 

You can list the content of the Global VM Exclusion List with the command Get-VBRVMExclusion. Write the results of this command to a variable to use it to remove VMs from the Global VM Exclusion list.

PS D:\scripts\Powershell> Get-VBRVMExclusion

 

Use the results of the former command to remove VMs from the Global VM Exclusions list.

PS D:\scripts\Powershell> Remove-VBRVMExclusion -Exclusion $Exc[0]

List the content of the list to check that the VM was removed.

PS D:\scripts\Powershell> Get-VBRVMExclusion

 

Global Malware Exclusion List

 

You can administer the Global Malware Exclusion list with the exact same logic, just use these three commands.

Add-VBRMalwareDetectionExclusion

Get-VBRMalwareDetectionExclusion

Remove-VBRMalwareDetectionExclusion

 

Now you can finally automate the usage of the Global Exclusion lists in Veeam backup and Replication.

 


6 comments

Userlevel 7
Badge +11

Nice post @JMeixner, tks for share!

Userlevel 7
Badge +20

Yes, really great post especially the PS commands to automate this.  Love seeing PS and adding things like this to my script library.  😎

Userlevel 7
Badge +7

Nice new feature. Thanks for sharing @JMeixner 

Userlevel 7
Badge +8

I have this script ready for managing the malware exclusion list. It will be officially announced in the script library as soon as v12.1 gets released.

Userlevel 7
Badge +17

I have this script ready for managing the malware exclusion list. It will be officially announced in the script library as soon as v12.1 gets released.

Ok 😎 I have spoilered the needed commands and logic.

It’s not that difficult.

Userlevel 7
Badge +20

I have this script ready for managing the malware exclusion list. It will be officially announced in the script library as soon as v12.1 gets released.

Very cool Steve. Going to check this one out.

Comment