Help Center
Choose product document...
Veeam Backup for Microsoft Office 365 2.0 [Archived]
PowerShell Reference

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 corresponding 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 Job parameter is used, the cmdlet will return the latest job session for the specified backup job.

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

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Example 1

This command returns the list of all job sessions.

PS C:\PS> Get-VBOJobSession

Example 2

This command returns all job sessions for the backup job.

You will need to perform the following steps:

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

PS C:\PS> $job = Get-VBOJob -Name "QA Backup"

PS C:\PS> Get-VBOJobSession -Job $job

Example 3

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

PS C:\PS> Get-VBOJobSession -Latest

Example 4

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

PS C:\PS> Get-VBOJobSession -Status Failed -Latest

Example 5

This command returns the statistics of the job session.

You will need to perform the following steps:

  1. Run Get-VBOJob to get the backup job. Save the result to the $job variable.
  2. Run Get-VBOJobSession 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.

PS C:\PS> $job = Get-VBOJob -Name "Tech Support Backup"

PS C:\PS> $session = Get-VBOJobSession -Job $job

PS C:\PS> $stat = $session.statistics

Example 6

This command returns the log information of the job session.

You will need to perform the following steps:

  1. Run Get-VBOJob to get the backup job. Save the result to the $job variable.
  2. Run Get-VBOJobSession 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.

PS C:\PS> $job = Get-VBOJob -Name "Tech Support Backup"

PS C:\PS> $session = Get-VBOJobSession -Job $job

PS C:\PS> $log = $session.log

Related Commands

Get-VBOJob

Veeam Large Logo

User Guide

RESTful API Reference

PowerShell Reference