in our environment we build veeam backup jobs by vmware datastores and exclusions of some vms are made with tags on the vm. Now I configured the exclusion on one job and would like to copy these to all the other jobs. But my Powershell script doesn't work (no errors are shown). Has someone an idea where is my wrong in this script:
Or someone know how I can set a new exclusion using VM tags?
Find VMs that have specific tag, using PowerCLI, query a backup job, find job objects that have the same name as VMs with corresponding tag and exclude those, leveraging Remove-VBRJobObject.
The script provided by you should not work, as it uses a different logic than the one I've described, as well as, obsolete commandlet Add-VBRJobObject that has been replaced already by Add-VBRViJobObject and Add-VBRHvJobObject ones.