This is an archive version of the document. To get the most up-to-date information, see the current version.

Get-VBOJobSession

Short Description

Returns jobs sessions.

Syntax

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

Detailed Description

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

Job session record contains the following information:

  • Id — specifies the system ID of the job session
  • JobId — specifies the system ID of the backup job
  • CreationTime — specifies date and time when the job session was created
  • EndTime — specifies date and time when the latest job session ended
  • Progress — specifies the number of processed mailboxes during the job session
  • Status — specifies the status of the backup job
  • Statistics — contains job session statistics
  • Log — contains job session log information

Parameters

Parameter

Description

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

Job

Specifies the backup job. The cmdlet will return job sessions for this backup job.

True

Named

True (ByValue)

False

Status

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

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

False

Named

False

False

Last

Indicates 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 backup job.

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

False

Named

False

False

<CommonParameters>

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

Examples

Example 1

This command returns the list of all job sessions.

Get-VBOJobSession

Example 2

This command returns all job sessions for the backup job.

  1. Run the Get-VBOJob cmdlet to get the backup job and save the result to the $job variable.
  2. Run the Get-VBOJobSession cmdlet with the $job variable.

$job = Get-VBOJob -Name "QA Backup"

Get-VBOJobSession -Job $job

Example 3

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

Get-VBOJobSession -Last

Example 4

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

Get-VBOJobSession -Status Failed -Last

Example 5

This command returns the statistics of the job session.

  1. Run the Get-VBOJob cmdlet to get the backup job. Save the result to the $job variable.
  2. Run the Get-VBOJobSession cmdlet with the $job variable to get the job session. Save the result to the $session variable.
  3. Get the job session statistics using the Statistics property of the job session object saved to the $session variable. Save the result to the $stat variable.

$job = Get-VBOJob -Name "Tech Support Backup"

$session = Get-VBOJobSession -Job $job

$stat = $session.statistics

Example 6

This command returns the log information of the job session.

  1. Run the Get-VBOJob cmdlet to get the backup job. Save the result to the $job variable.
  2. Run the Get-VBOJobSession cmdlet with the $job variable. Save the result to the $session variable.
  3. Get the job session log information using the Log property of the job session object saved to the $session variable. Save the result to the $log variable.

$job = Get-VBOJob -Name "Tech Support Backup"

$session = Get-VBOJobSession -Job $job

$log = $session.log

Related Commands

Get-VBOJob