PowerShell script exchange
Post Reply
Yukinobu
Enthusiast
Posts: 74
Liked: never
Joined: Apr 30, 2013 1:19 am
Full Name: Yukinobu Asami
Contact:

How to get number of tasks that are currently running?

Post by Yukinobu »

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
veremin
Product Manager
Posts: 20283
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

Kindly, check the script written by Tom and see whether it meets your expectations. Thanks.
Yukinobu
Enthusiast
Posts: 74
Liked: never
Joined: Apr 30, 2013 1:19 am
Full Name: Yukinobu Asami
Contact:

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

Post by Yukinobu »

Thank you!
veremin
Product Manager
Posts: 20283
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests