After the vm is failed over, the job still exists in the gui and the column "Objects in job" is "0". I would like to list the jobs that do not contain any vm's in it (the Objects in job column would be "0".
I tried this script, but it still shows an object name for the job where the Veeam gui shows "0"
Foreach ($Job in Get-VBRJob)
{
$Job | select name, {$_.GetObjectsInJob().name} | ft
}
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Aug 20, 2014 1:00 pm
- Contact:
-
- Product Manager
- Posts: 20270
- Liked: 2252 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List number of Objects in job
Just to be sure - you've meant permanent failover, right?
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Aug 20, 2014 1:00 pm
- Contact:
Re: List number of Objects in job
Correct, permanent failover.
thanks
thanks
-
- Product Manager
- Posts: 20270
- Liked: 2252 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List number of Objects in job
Those objects are added to exclusions list automatically and get "Exclude" type inside PS. So, the idea will be to find replica jobs having zero "include" objects. The following one-liner should do the trick:
Thanks.
Code: Select all
Get-VBRJob | where {$_.JobType -eq "Replica"} | where {(($_.GetObjectsInJob() | where {$_.type -eq "Include"} | Measure-Object).Count -eq 0)}
Who is online
Users browsing this forum: No registered users and 15 guests