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 » May 02, 2014 1:16 am

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 » May 02, 2014 5:40 am 1 person likes this post

And the answer is...

Get-VBRBackupSession | Select Name,State

Vitaliy S.
Product Manager
Posts: 22127
Liked: 1382 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Powershell - Get running VBR jobs

Post by Vitaliy S. » May 02, 2014 2:03 pm 1 person likes this post

Glad that you've figured it out already ;)

v.Eremin
Product Manager
Posts: 15967
Liked: 1284 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Powershell - Get running VBR jobs

Post by v.Eremin » May 04, 2014 7:38 pm

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 1 guest