Hello,
I have a specific need for a way to poll Veeam server and check if any Backup jobs are running. I need to return TRUE only if there is an actual backup job running, I would return FALSE if the job type is instant-restore, restore, etc, but TRUE if job type was a backup job. Is there an easy way to poll the system and return that information quickly?
-
- Expert
- Posts: 122
- Liked: 7 times
- Joined: Mar 27, 2012 10:13 pm
- Full Name: Chad Killion
- Contact:
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How would I check for running backup jobs?
Check the following example and see whether it's something you're looking for:
Thanks.
Code: Select all
Asnp VeeamPSSnapin
$Trigger = $Null
$RunningJobs = Get-VBRJob | where {$_.JobType -eq "Backup" -and {$_.GetLatestState()} -eq "Working"} | select name
if ($RunningJobs.Count -ne 0) {$Trigger = $True}
else {$Trigger = $False}
-
- Expert
- Posts: 122
- Liked: 7 times
- Joined: Mar 27, 2012 10:13 pm
- Full Name: Chad Killion
- Contact:
Re: How would I check for running backup jobs?
Perfect! Thanks so much!
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How would I check for running backup jobs?
You're welcome. Should other help be needed, don't hesitate to let us know. Thanks.
Who is online
Users browsing this forum: Google [Bot] and 13 guests