- Posts: 199
- Liked: 33 times
- Joined: Jul 26, 2012 8:04 pm
- Full Name: Erik Kisner
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.
- Posts: 293
- Liked: 18 times
- Joined: Apr 13, 2011 12:45 pm
- Full Name: Thomas McConnell
http://vpowercli.wordpress.com/2012/01/ ... -in-a-job/
Users browsing this forum: No registered users and 5 guests