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

Get-VBRSession

Short Description

Returns tape jobs sessions.

Applies to

Platform: VMware, Hyper-V

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

This cmdlet provides the following parameter sets:

  • To get the session for the specified tape job

Get-VBRSession -Job <VBRJob> [-Last]  [<CommonParameters>]

  • To get the tape session with the specified ID

Get-VBRSession -Id <guid[]>  [<CommonParameters>]

  • To get the specified tape session

Get-VBRSession -Session <VBRSession>  [<CommonParameters>]

  • To get the session for the tape job with the specified result

Get-VBRSession -Job <VBRJob> [-Result <VBRSessionResult> {None | Success | Warning | Failed}]  [<CommonParameters>]

  • To get the session for the tape job with the specified state

Get-VBRSession -Job <VBRJob> [-State <VBRSessionState> {Stopped | Starting | Stopping | Working | Pausing |Resuming | WaitingTape | Idle | Postprocessing | WaitingRepository | Pending}]  [<CommonParameters>]>]

Detailed Description

This cmdlet returns sessions for a selected tape job.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Job

Specifies the tape job for which you want to get sessions that have been run.

Accepts VBRJob (BackupToTape or FileToTape) type.

True

Named

True (ByProperty
Name)

False

ID

Specifies the ID of the session. The cmdlet will return the session with this ID.

False

Named

False

 

Last

Indicates that the command returns the last session of the specified job.

False

Named

False

False

Session

Specifies the job session for which you want to get an updated state.

Accepts VBRSession type.

True

Named

True (ByValue,
ByProperty
Name)

False

State

Specifies the session state. The cmdlet will return sessions with the specified state.

See VBRSessionState.

False

Named

False

False

Result

Specifies the session result. The cmdlet will return sessions with the specified result.

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.

Return Type

VBRBackupSession

Example

This example shows how to get the session for the specified tape job.

  1. Run the Get-VBRJob cmdlet to get the backup job. Save the result to the $job variable.
  2. Run the Get-VBRSession cmdlet. Set the $job variable as the Job parameter value.

$job = Get-VBRJob -Name "Backup Copy Job"

$session = Get-VBRSession -Job $job

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