Veeam exclude disks using PowerShell

Posted by

When you have multiple jobs with many VMs it’s a boring task to change all the disk exclusions by hand. That’s why VEEAM have made a nice PowerShell module to automate this boring tasks.

Excluded disks are displayed with numbers, the numbers in Hyper-V are different (because of the IDE disks) then how the numbers are showed in VMWare.

Since Veeam 9.5 Update 4 the diskfilter mechanism in Veeam is changed.

Now we can report both.. SCSI Controller id and the Keynumber as we known earlier.
This means the PowerShell CMDLets also Changed.

Report diskfilter:

Change diskfilter:

Change diskfilter before 9.5 Update 4

See the current excluded disks and the numbers with this script (Run as Administrator):

Change the disks exclusions with PowerShell (Run as Administrator):

Comments are welcome.


  1. Nice scripts. You also have a script to see the current excluded disks on all VM’s and export to .csv for 9.5 Update 4 and higher?

    When I run the pre 9.5u4 script I get this as .csv output:

    #TYPE Selected.Veeam.Backup.Core.CObjectInJob

    Thx in advance,

    1. Hello Ali,

      You need to expand the diskfilter object.
      A way to do this is with a expression like: select name, @{label=”Diskfilter”;expression={$_.diskfilter.disks}}
      So you can go deeper in the object this way: $_.diskfilter.disks.keys

      Hope this helped.

  2. Hello Rob. Do you have any advise on how to explore the undocumented Veeam Powershell object model? I have a use case for example where I need to delete restore point files from a repository, my hunch is that there is either static or instance methods to do this, but am not sure where to look.

    1. Hello Eugene,
      Never did that before. But the Remove-VBRRestorePoint is not suitable?
      What are you trying to archive? There are a lot of methods available with the “get-vbrrestorepoint | gm” commandlet..


      1. Yes I wasn’t able to get anyone on to suggest how, but I need to delete the file which stores a restore point. It is on a repository of a deduplication appliance which does not have any methods for interacting with the items in the deduplication appliance. Veeam can interact with these files via the Files pane. But I have thousands of files to delete, and am still searching.

        The objects returned from get-vbrrestorepoint do have delete() methods, but a forum member told me this is “delete from configuration database” where what i need is to delete the file. I can get the file name and metadata of a restore point with the .findStorage() method of an object returned by get-vbrrestore point. I feel so close 🙂

  3. Besides the DiskFilter property of VBRJobObject there is still a DiskFilter in the Info property of VBRJobObject, which also has a setter.

    However, the content is now an XML structure. The easiest way is to read Info.DiskFilter of an existing job with the corresponding configuration and then have a correct XML structure that can be stored or used as string to update other job objects.
    Updating is done the same way as before 9.5 Update 4

    Tested with Veeam B&R 12

Leave a Reply

Your email address will not be published. Required fields are marked *