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

Get-VBOJobSession

In this article

    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 on common parameters, see Microsoft Docs.

    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 Get-VBOJob to get the backup job and save the result to the $job variable.
    2. Run Get-VBOJobSession 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 "Failed" status.

    Get-VBOJobSession -Status Failed -Last

    Example 5

    This command returns the statistics of the job session.

    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.

    $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 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.

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

    $session = Get-VBOJobSession -Job $job

    $log = $session.log

    Related Commands

    Get-VBOJob

    I want to report a typo

    There is a misspelling right here:

     

    I want to let the Veeam Documentation Team know about that.