Get-VBRBackupSession

Short Description

Returns jobs sessions.

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

This cmdlet provides the following parameter sets:

  • Name (Default)

    Get-VBRBackupSession [-Name <String[]>] [<CommonParameters>]

  • Id

    Get-VBRBackupSession -Id <Guid[]> [<CommonParameters>]

  • State

    Get-VBRBackupSession -State <VBRSessionState[]> [<CommonParameters>]

Detailed Description

This cmdlet returns jobs sessions.

You can get the sessions for the following jobs:

  • Backup jobs
  • Replication jobs
  • Backup copy jobs
  • File backup jobs
  • File backup copy jobs
  • Cloud director backup jobs
  • Cloud director replication jobs

Run the Get-VSBTaskSessionReturns tasks performed during the specified SureBackup session. This cmdlet is obsolete. The cmdlet will still work but may not be supported in further versions. Use the Get-VBRSureBackupTaskSession cmdlet instead. cmdlet to get the SureBackup jobs sessions.

Run the Get-VBRSessionReturns job sessions. cmdlet to get the tape jobs sessions.

Run the Get-VBRUnstructuredBackupSessionReturns backup sessions for file backup jobs and object storage backup jobs. cmdlet to get the file backup jobs and file backup copy jobs.

Run the Get-VBRTaskSessionReturns tasks performed during job sessions. cmdlet to get the tasks performed during specific sessions.

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Id

Specifies the array of backup session IDs. The cmdlet will return the sessions with these IDs.

Guid[]

True

Named

False

Name

Specify the array of backup session names, followed by the backup type (Incremental, Full, Synthetic Full). The cmdlet will return the sessions with these names and the specified backup type.

String[]

False

Named

False

State

Specifies the session state. The cmdlet will return sessions with the specified state.

VBRSessionState[]

True

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Output Object

VBRBackupSession

Examples

Get-VBRBackupSessionExample 1. Getting All Backup Sessions

This command returns the list of all backup sessions.

Get-VBRBackupSession

Get-VBRBackupSessionExample 2. Getting Backup Session by Name

This command returns all Backup Copy sessions with incremental backups.

Get-VBRBackupSession -Name "Backup Copy (Incremental)"

Get-VBRBackupSessionExample 3. Getting Latest Backup Session for Backup Job

This example shows how to return the latest backup session for the backup job.

$job = Get-VBRJob -Name "ABC Job"

Get-VBRBackupSession | Where {$_.jobId -eq $job.Id.Guid} | Sort EndTimeUTC -Descending | Select -First 1

Perform the following steps:

  1. Run the Get-VBRJobReturns existing jobs. cmdlet. Specify the Name parameter value. Save the result to the $job variable.
  2. Run the Get-VBRBackupSession cmdlet. Use the Where-Object method to get all backup sessions for the backup job in the $job variable. Use the Sort-Object method to get the latest backup session.

Get-VBRBackupSessionExample 4. Getting Latest Stopped Backup Session

This command returns the latest stopped backup session.

Get-VBRBackupSession | Sort {$_.state -eq "Stopped"} -Descending | Select -First 1

Get-VBRBackupSessionExample 5. Getting Backup Sessions with Warning Status

This command returns backup sessions that ended with the Warning status.

Get-VBRBackupSession | Where {$_.result -eq "Warning"}

Get-VBRBackupSessionExample 6. Getting Backup Sessions with Specified State

This command returns all backup sessions that are currently in the Working state.

Get-VBRBackupSession -State Working

Get-VBRJobReturns existing jobs.

Page updated 2026-08-19

Page content applies to build 13.1.1.18