PowerShell script exchange
Post Reply
AdrianHinton
Enthusiast
Posts: 71
Liked: 6 times
Joined: Apr 07, 2014 10:00 am
Full Name: Adrian Hinton
Contact:

Powershell - Get running VBR jobs

Post by AdrianHinton »

Hi,

What would be the best way to get all/any currently running VBR jobs using powershell?
AdrianHinton
Enthusiast
Posts: 71
Liked: 6 times
Joined: Apr 07, 2014 10:00 am
Full Name: Adrian Hinton
Contact:

Re: Powershell - Get running VBR jobs

Post by AdrianHinton » 1 person likes this post

And the answer is...

Get-VBRBackupSession | Select Name,State
Vitaliy S.
VP, Product Management
Posts: 27377
Liked: 2800 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Powershell - Get running VBR jobs

Post by Vitaliy S. » 1 person likes this post

Glad that you've figured it out already ;)
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Powershell - Get running VBR jobs

Post by veremin »

Also, backup job has a dynamic method called .GetLastState() that can be used in your case. Just write something like the following:

Code: Select all

Get-VBRJob | where {$_.GetLastState() -eq "Running"}
Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests