PowerShell script exchange
Post Reply
mboswell
Service Provider
Posts: 43
Liked: 3 times
Joined: Jul 21, 2022 10:40 pm
Full Name: Matthew Boswell
Contact:

Tracking Restore Jobs with Powershell

Post by mboswell »

Hi all,

Have a question about tracking the status of a running restore job using powershell. I'm using Get-VBRRestoreSession and then looking for the completion percentage. I found a couple of properties that look like they might be what I want, but during the job run, they remain at 0. Specifically, I'm looking at "BaseProgress" and "SessionInfo.CompletionPercentage"

What might I be missing?

Thanks,

Matt
ronnmartin61
Veeam Software
Posts: 441
Liked: 131 times
Joined: Mar 07, 2016 3:55 pm
Full Name: Ronn Martin
Contact:

Re: Tracking Restore Jobs with Powershell

Post by ronnmartin61 »

Looked at it a bit and it appears one has to grab generic session object data for this -

Code: Select all

foreach ($restoSession in Get-VBRRestoreSession)
{
    Write-Host $restoSession.Name
    foreach ($task in $restoSession.GetTaskSessions())
    {
        $session = Get-VBRSession -Id $task.JobSessId.ToString()
        Write-Host "   " $session.Progress.ToString()
    }
}
Hope this helps.
mboswell
Service Provider
Posts: 43
Liked: 3 times
Joined: Jul 21, 2022 10:40 pm
Full Name: Matthew Boswell
Contact:

Re: Tracking Restore Jobs with Powershell

Post by mboswell »

It absolutely does help. Thank you!
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests