-
- Veteran
- Posts: 380
- Liked: 48 times
- Joined: Sep 05, 2011 1:31 pm
- Full Name: Andre
- Contact:
list all tape jobs within 24 hours
good day
is there a powershell function similar to this one:
[Veeam.Backup.Core.CBackupJob]::GetAll()
to list all tape sessions?
Thanks
is there a powershell function similar to this one:
[Veeam.Backup.Core.CBackupJob]::GetAll()
to list all tape sessions?
Thanks
-
- Veteran
- Posts: 380
- Liked: 48 times
- Joined: Sep 05, 2011 1:31 pm
- Full Name: Andre
- Contact:
Re: list all tape jobs within 24 hours
found a "solution" myself, but nevertheless curious if there is a shorter solution
Code: Select all
$tapejobs = Get-VBRTapeJob
foreach ($job in $tapejobs) {
$PreviousDay = [DateTime]::Now.AddHours(-24)
[Veeam.Backup.Core.CBackupSession]::GetByJob($job.Id) | Where-Object {$_.EndTime -gt $PreviousDay -or $_.StartTime -gt $PreviousDay} | fl name
}
-
- Veeam Software
- Posts: 1912
- Liked: 635 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: list all tape jobs within 24 hours
It's either with this .NET method or Get-VBRSession. But the object returned is more concise in this case and doesn't contain all the data available when returning CBackupSession with static method.
Thanks!
Thanks!
-
- Veteran
- Posts: 380
- Liked: 48 times
- Joined: Sep 05, 2011 1:31 pm
- Full Name: Andre
- Contact:
Re: list all tape jobs within 24 hours
Hello Oleg
Thanks. With Get-VBRSession i also need to specifiy a Job name or Id. I was searching for a easy Solution to get all Jobs without specify the job name or id. So something like get-vbrsession -all. but this seems not to be possible at the moment.
anyways, i have found the solution so far
regards
Thanks. With Get-VBRSession i also need to specifiy a Job name or Id. I was searching for a easy Solution to get all Jobs without specify the job name or id. So something like get-vbrsession -all. but this seems not to be possible at the moment.
anyways, i have found the solution so far
regards
-
- Veeam Software
- Posts: 1912
- Liked: 635 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: list all tape jobs within 24 hours
Andre,
I was almost ready to offer you [Veeam.Backup.Core.CBackupSession]::GetAll() method, but, as it turned out, it doesn't parse tape jobs at all.
So, that's what we've got for now.
Best regards,
Oleg
I was almost ready to offer you [Veeam.Backup.Core.CBackupSession]::GetAll() method, but, as it turned out, it doesn't parse tape jobs at all.
So, that's what we've got for now.
Best regards,
Oleg
Who is online
Users browsing this forum: No registered users and 18 guests