PowerShell script exchange
Post Reply
revog
Novice
Posts: 7
Liked: never
Joined: Jun 01, 2017 6:04 am
Contact:

Get Linux Agent Restore Sessions in PowerShell

Post by revog »

Hello

Is there a way to fetch the restore sessions of Agent Backups (File restores, Export to VM, ...) in Powershell?
For VMs it is possible to get this Information with Get-VBRRestoreSession. But I could not find any Cmdlet for Agents...

Any ideas how to achieve this?

Regards
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get Linux Agent Restore Sessions in PowerShell

Post by oleg.feoktistov »

Hi,

I just checked in v11 and FLR sessions for linux are reflected via Get-VBRRestoreSession. When it comes to export, I'm afraid there isn't any method to get all the sessions, but you can get the last one with the .NET method below:

Code: Select all

# Get job type from EDbJobType enum
$jobType = [Veeam.Backup.Model.EDbJobType]::VbkExport

# Get last session for the job type you need
$lastSession = [Veeam.Backup.Core.CRestoreSession]::FindLastByJobType($jobType)
Thanks,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests