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

PowerShell • Powershell command to fetch the last 24 hours Copy job status

$
0
0
Hi All,

We have below commands to fetch the last 24 hours copy jobs status.

*************************************************

# Fetch each backup copy job sessions from VBR for the last 24 hours

$vbrsessions = Get-VBRBackupSession -Name *Copy* | Where-Object {$_.EndTime -ge (Get-Date).addhours(-24)}

# Fetch each client session details from each backup job
$client = foreach ($session in $vbrsessions) {$session.gettasksessions()| Select Name, Jobname, Status, @{n='StartTime';e={$_.Progress.StartTimeLocal}}, @{n='EndTime';e={$_.Progress.StopTimeLocal}},@{n='TransferedSizeinMB';e={[math]::Round(($_.Progress.TransferedSize/1048576),2)}}}

****************************************************

But now we are getting the error message for the below command. What would be the issue and solution?

Get-VBRBackupSession -Name *Copy* | Where-Object {$_.EndTime -ge (Get-Date).addhours(-24)}


Error:
Get-VBRBackupSession : The read operation failed, see inner exception.
At line:1 char:1



Regards,
Surya

Statistics: Posted by Suryanarayanan — May 20, 2025 3:31 pm



Viewing all articles
Browse latest Browse all 9920

Latest Images

Trending Articles



Latest Images