Been poking aruond at this for a little while, and although I'm very close, my progress has dwindled down to a stand-still.
I want to add a simple exclusion, of all VMs in a datastore - specifically, by excluding the datastore. Please don't mind my nesting, I prefer it when writing on-the-fly commands, over scripts with variables.
Remove-VBRJobObject -Job (Get-VBRJob -name "My Backup Job") -Objects (Find-VBRViDatastore -server (Get-VBRServer -name "vCenter.domain.com") -name "Datastore to exclude")
Unfortunately, Find-VBRViDatastore returns a CViDatastoreItem value, where Remove-VBRJobObject requires a CObjectInJob value.
Anyone have some insight? I must need a different command to return a datastore as a CObjectInJob, but I can't seem to find one.