Help Center
Choose product document...
Veeam Backup & Replication 9.5 Update 4
PowerShell Reference

Get-VBRBackupSession

Short Description

Returns jobs sessions.

Applies to

Platform: VMware, Hyper-V

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

Get-VBRBackupSession [-Name <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description

This cmdlet returns jobs sessions.

You can get the sessions for the following jobs:

  • Backup jobs
  • Replication jobs
  • File copy jobs
  • Backup copy jobs.

Run Get-VSBTaskSession to get the SureBackup jobs sessions.

Run Get-VBRSession to get the tape jobs sessions.

Run Get-VBRTaskSession to get the tasks performed during specific sessions.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Name

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

False

Named

False

True

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Return Type

None.

Example 1

This command returns the list of all backup sessions.

Get-VBRBackupSession

Example 2

This command returns all backup copy sessions.

Get-VBRBackupSession -Name *Backup Copy*

Example 3

This command returns the latest backup session for the backup job.

You will need to perform the following steps:

  1. Run Get-VBRJob to get the backup job and save the result to the $job variable.
  2. Run Get-VBRBackupSession with the $job variable. Use Where-Object method to get all backup sessions for the backup job. Use Sort-Object method to get the latest backup session.

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

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

Example 4

This command returns the latest stopped backup session.

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

Example 5

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

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

Related Commands

Get-VBRJob

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions Reference

Veeam Availability for Nutanix AHV Documentation

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation