-
- Novice
- Posts: 5
- Liked: never
- Joined: Aug 24, 2015 9:28 am
- Full Name: Abderrahmane Belgdour
- Contact:
after job info through PowerShell
hello,
i need a powershell script to show the jobs thats runs after a other job.
I can't figered out with get-vbrjob or get-VBRJobScheduleOptions -job "Jobname"
Does someone have any ideas
Thanks
i need a powershell script to show the jobs thats runs after a other job.
I can't figered out with get-vbrjob or get-VBRJobScheduleOptions -job "Jobname"
Does someone have any ideas
Thanks
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: after job info through PowerShell
You should be able to achieve what you're after, using the following script:
Thanks.
Code: Select all
$Job = Get-VBRJob -Name "Name of parent Job"
(Get-VBRJob) | where {$_.PreviousJobIdInScheduleChain -eq $Job.Id} | select name
-
- Novice
- Posts: 5
- Liked: never
- Joined: Aug 24, 2015 9:28 am
- Full Name: Abderrahmane Belgdour
- Contact:
Re: after job info through PowerShell
Hello Eremin,
Thankd for your post, but I get a emty output with your script
Thankd for your post, but I get a emty output with your script
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: after job info through PowerShell
Are you positive that you've specified name of a job other job is linked to, not the name of linked job itself?
-
- Novice
- Posts: 5
- Liked: never
- Joined: Aug 24, 2015 9:28 am
- Full Name: Abderrahmane Belgdour
- Contact:
Re: after job info through PowerShell
Yes I'm positive
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: after job info through PowerShell
What product version you're currently at? What happens if you change the script slightly?
You can also check whether or not PS sees at lest one linked job:
Thanks.
Code: Select all
$Job = Get-VBRJob -Name "Name of parent Job"
(Get-VBRJob) | where {$_.PreviousJobIdInScheduleChain.Guid -eq $Job.Id} | select name
Code: Select all
(Get-VBRJob) | where {$_.PreviousJobIdInScheduleChain.Guid -ne $Null} | select name
-
- Novice
- Posts: 5
- Liked: never
- Joined: Aug 24, 2015 9:28 am
- Full Name: Abderrahmane Belgdour
- Contact:
Re: after job info through PowerShell
Still get a empty output
We use Veeam B&R 8.0
We use Veeam B&R 8.0
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: after job info through PowerShell
The provided script should provide you with the list of linked jobs, so, I not sure what might be wrong in your case. Can you post a screenshot of linked jobs? Thanks.
-
- VP, Product Management
- Posts: 6035
- Liked: 2860 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: after job info through PowerShell
Any chance it happens to be Windows 2008R2 with an older Powershell version? I've seen lots of strange behavior if you're not on at least Powershell 3.0, most commonly on Windows 2008R2 with the default built in Powershell (v2 I think). If I run across a script that doesn't work as expected I always start with upgrading Powershell to at least the 3.0 version.
-
- Novice
- Posts: 5
- Liked: never
- Joined: Aug 24, 2015 9:28 am
- Full Name: Abderrahmane Belgdour
- Contact:
Re: after job info through PowerShell
We're running PowerShell V2. Iám going to update it to V3 and wil test the commando again
thx
thx
Who is online
Users browsing this forum: No registered users and 7 guests