Quantcast
Channel: R&D Forums
Viewing all articles
Browse latest Browse all 9968

PowerShell • Re: Check Running Jobs

$
0
0
Hi david, thank you for the tip.
I started from your code and i modified it, now I have a PS1 that check running jobs for more than 10 hours (applicable to Backup, Replica, Backup copy):

Code:

$jobs = Get-VBRJobForeach($j in $jobs){$lastSess = $j.FindLastSession()if(($lastSess.State -eq "Working") -and ($lastSess.Creationtime -lt (Get-Date).AddHours(-10))){$lastSess.JobName + " is " + $lastSess.State >> C:\Veeam_Script\check_running.txt    }}

Statistics: Posted by DanCasan — Jan 24, 2024 11:14 am



Viewing all articles
Browse latest Browse all 9968

Latest Images

Trending Articles



Latest Images