Get-VBOJobSession

Short Description

Returns backup and backup copy job sessions.

Syntax

This cmdlet provides the following parameter sets:

  • AllParametersSet (Default)

    Get-VBOJobSession [-JobType <VBOJobSessionType>] [-Status <VBOJobStatus>] [-Last] [<CommonParameters>]

  • SingleParametersSet

    Get-VBOJobSession [-Job <IVBOJobWithId>] [-Status <VBOJobStatus>] [-Last] [<CommonParameters>]

Detailed Description

This cmdlet returns job sessions stored in Veeam Backup for Microsoft 365.

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Job

Specifies a job. The cmdlet will return job sessions for this backup or backup copy job.

IVBOJobWithId

Accepts the VBOJob or VBOCopyJob object.

To get this object, run the Get-VBOJobReturns backup jobs. or Get-VBOCopyJobReturns backup copy jobs. cmdlet.

IVBOJobWithId

False

Named

True (ByValue)

JobType

Specifies a job type. The cmdlet will return job sessions for the jobs of the specified type:

  • Backup
  • Copy

VBOJobSessionType

False

Named

False

Last

Defines that the cmdlet will return the latest job session.

If the Job parameter is used, the cmdlet will return the latest job session for the specified job.

If the Status parameter is used, the cmdlet will return the latest job session for the jobs with the specified status.

Default: False

SwitchParameter

False

Named

False

Status

Specifies a job status. The cmdlet will return job sessions for the jobs with the specified status:

  • Disconnected
  • Failed
  • NotConfigured
  • Queued
  • Running
  • Stopped
  • Success
  • Warning
  • Updating

VBOJobStatus

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Learn.

Output Object

The cmdlet returns the VBOJobSession object that contains details about job sessions.

Examples

Get-VBOJobSessionExample 1: Getting All Job Sessions

This command returns a list of all job sessions.

Get-VBOJobSession

Get-VBOJobSessionExample 2: Getting Job Sessions for Backup Jobs with Success Status

This command returns all job sessions for backup jobs with the Success status.

Get-VBOJobSession -JobType Backup -Status Success

Get-VBOJobSessionExample 3: Getting Latest Job Session

This command returns the latest job session stored in Veeam Backup for Microsoft 365.

Get-VBOJobSession -Last

Get-VBOJobSessionExample 4: Getting Latest Job Session for Backup Jobs with Failed Status

This command returns the latest job session for backup jobs with the Failed status.

Get-VBOJobSession -JobType Backup -Status Failed -Last

Get-VBOJobSessionExample 5: Getting Statistics for Latest Job Session

This example shows how to get statistics for the latest job session.

$session = Get-VBOJobSession -Last

$session.statistics

Perform the following steps:

  1. Run the Get-VBOJobSession cmdlet with the Last parameter to get the latest job session. Save the result to the $session variable.
  2. Get the job session statistics using the Statistics property of the job session object saved to the $session variable.

Page updated 2026-08-21

Page content applies to build 8.6.0.1102