i was able to get the latest tape backup session with
Code: Select all
$Job = Get-VBRTapeJob -name blablabla
$Session = $Job.FindLastSession()
How can i get the last session of a tape backup job?
Code: Select all
Get-VBRSession
Thanks.
Chris
Code: Select all
$Job = Get-VBRTapeJob -name blablabla
$Session = $Job.FindLastSession()
Code: Select all
Get-VBRSession
Code: Select all
$BTJ = Get-VBRTapeJob -Name "Name of your backup to tape job"
Get-VBRSession -Job $BTJ
Code: Select all
$Info = $Session.GetTaskSessions()
Code: Select all
Get-VBRTaskSession -Session $Session
Code: Select all
$Session = Get-VBRSession -Job $BTJ | Sort-Object creationtime | Select-Object -Last 1
$Session.Log
Code: Select all
$BTJ = Get-VBRTapeJob -Name "Name of backup to tape job"
$BackupSession = [veeam.backup.core.cbackupsession]::GetByJob($BTJ.id)
$BackupSession | Get-VBRTaskSession
Code: Select all
Add-PSSnapin VeeamPSSnapin
Get-VBRTapeJob | ? {$_.GetLastState() -like "WaitingTape"} | Stop-VBRJob
Code: Select all
Get-VBRTapeJob -name "Daily Backup - Weekly Tape Offload"
Code: Select all
Get-VBRTapeJob | ? {$_.GetLastState() -like "WaitingTape"} | Stop-VBRJob
Code: Select all
Get-VBRTapeJob : Value cannot be null.
Parameter name: name
At line:1 char:1
+ Get-VBRTapeJob | ? {$_.GetLastState() -like "WaitingTape"} | Stop-VBRJob
+ ~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VBRTapeJob], ArgumentNullException
+ FullyQualifiedErrorId : System.ArgumentNullException,Veeam.Backup.PowerShell.Cmdlets.GetVBRTapeJob
Code: Select all
Get-VBRTapeJob | Where-Object {$_.LastState -like "WaitingTape"} | Stop-VBRJob
Code: Select all
Get-VBRTapeJob | ? {$_.LastState -like "WaitingTape"} | % { $_ | Stop-VBRJob }
It's never too late to write a script.Maybe i'm too late
Users browsing this forum: No registered users and 10 guests