Veeam exclude disks using PowerShell

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.

Comments ( 3 )

  1. Avatar
    Ali O.August 20, 2019 16 // Reply

    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 Name,"DiskFilter" SRV0032,"Veeam.Backup.Core.CDiskFilter" SRV0050,"Veeam.Backup.Core.CDiskFilter" SRV0056,"Veeam.Backup.Core.CDiskFilter" SRV0117,"Veeam.Backup.Core.CDiskFilter" SRV0120,"Veeam.Backup.Core.CDiskFilter" Thx in advance, Ali

    • Avatar
      AdminAugust 27, 2019 16 // Reply

      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.

      • Avatar
        AdminAugust 27, 2019 16 // Reply

        Updated the code :)

Leave a reply

Your email address will not be published.