How to get number of tasks that are currently running?

PowerShell script exchange

How to get number of tasks that are currently running?

Veeam Logoby Yukinobu » Wed Apr 13, 2016 7:44 am

Hi all

I want to get number of concurrent task.
But following script result is 1, during I perform one job that has 1 VM that has 3 disks and these are parallel processed.

Code: Select all
Add-PSSnapin VeeamPSSnapin
foreach ($Job in Get-VBRJob | ? {$_.GetLastState() -eq "Working"}){
foreach ($Task in $Job.FindLastSession().GetTaskSessionsByStatus("InProgress")){
$TaskCount=$TaskCount+$Task.CurrentDiskNum
}
}


Do you have good idea?


Thanks in advance,
Yukinobu
Yukinobu
Veeam ProPartner
 
Posts: 27
Liked: never
Joined: Tue Apr 30, 2013 1:19 am
Full Name: Yukinobu Asami

Re: How to get number of tasks that are currently running?

Veeam Logoby v.Eremin » Wed Apr 13, 2016 1:31 pm

Kindly, check the script written by Tom and see whether it meets your expectations. Thanks.
v.Eremin
Veeam Software
 
Posts: 13295
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: How to get number of tasks that are currently running?

Veeam Logoby Yukinobu » Thu Apr 14, 2016 1:00 am

Thank you!
Yukinobu
Veeam ProPartner
 
Posts: 27
Liked: never
Joined: Tue Apr 30, 2013 1:19 am
Full Name: Yukinobu Asami

Re: How to get number of tasks that are currently running?

Veeam Logoby v.Eremin » Thu Apr 14, 2016 10:16 am

I'm also wondering whether you're using Veeam ONE along with Backup and Replication. I'm asking because we've got requests to implement similar functionality in Veeam ONE Monitor. Chances are, one of the next feature versions of this product might be able to boast with this feature. Thanks.
v.Eremin
Veeam Software
 
Posts: 13295
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: capedFef and 11 guests