-
- Influencer
- Posts: 15
- Liked: never
- Joined: Jun 21, 2021 6:27 am
- Full Name: Volkan von Klass
- Contact:
How do i get the Last 24 Hours as a List?
Hi
Whats the best way to get the "last 24 Hours" list from the console by powershell?
Thank you
Volkan
Whats the best way to get the "last 24 Hours" list from the console by powershell?
Thank you
Volkan
-
- Veeam Software
- Posts: 2590
- Liked: 606 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: How do i get the Last 24 Hours as a List?
Hi @volkanvk,
Get-VBRBackupSession and/or Get-VBRSession will have a CreationTime property. I would just do something like:
$CurrDate = Get-Date
$last24Hours = Get-VBRBackupSession | Where-Object {$_.CreationTime -ge ($CurrDate.AddDays(-1) -AND $_.CreationTime -le $CurrDate}
You can add further clauses to the Where-Object section of the pipeline, but this would be best bet.
Get-VBRBackupSession and/or Get-VBRSession will have a CreationTime property. I would just do something like:
$CurrDate = Get-Date
$last24Hours = Get-VBRBackupSession | Where-Object {$_.CreationTime -ge ($CurrDate.AddDays(-1) -AND $_.CreationTime -le $CurrDate}
You can add further clauses to the Where-Object section of the pipeline, but this would be best bet.
David Domask | Product Management: Principal Analyst
-
- Influencer
- Posts: 15
- Liked: never
- Joined: Jun 21, 2021 6:27 am
- Full Name: Volkan von Klass
- Contact:
Re: How do i get the Last 24 Hours as a List?
@david.domask
That looks good, but i have no agent or tape jobs in this list.
That looks good, but i have no agent or tape jobs in this list.
-
- Veeam Software
- Posts: 2590
- Liked: 606 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: How do i get the Last 24 Hours as a List?
Hi @volkanvk, you are very welcome; both tape and agent jobs have their own *Session cmdlets:
Get-VBRSession
Get-VBRComputerBackupJobSession
SO you would need to build an array for each one, or you can use Generic List to add all of them together, but it might be best for you to just build each array, do the processing, and then send the resulting data to whatever your final destination may be for the data.
Get-VBRSession
Get-VBRComputerBackupJobSession
SO you would need to build an array for each one, or you can use Generic List to add all of them together, but it might be best for you to just build each array, do the processing, and then send the resulting data to whatever your final destination may be for the data.
David Domask | Product Management: Principal Analyst
-
- Veteran
- Posts: 1045
- Liked: 210 times
- Joined: Oct 02, 2017 7:28 pm
- Full Name: Herbert Szumovski
- Contact:
Re: How do i get the Last 24 Hours as a List?
@volkanvk You can also try this one (Oldies but Goldies, refurbished.
Works also with 12.1, but takes time to finish in a larger environment): https://github.com/marcohorstmann/MyVeeamReport

-
- Influencer
- Posts: 15
- Liked: never
- Joined: Jun 21, 2021 6:27 am
- Full Name: Volkan von Klass
- Contact:
Re: How do i get the Last 24 Hours as a List?
@Herbert Sz
Cool, i have now all informations on a html page for the Backup/Agent and Tape Sessions but there is no option to export this to a csv file. The only option is for backup states...
Any idea how to get a csv from the result?
Cool, i have now all informations on a html page for the Backup/Agent and Tape Sessions but there is no option to export this to a csv file. The only option is for backup states...

Any idea how to get a csv from the result?
-
- Veteran
- Posts: 1045
- Liked: 210 times
- Joined: Oct 02, 2017 7:28 pm
- Full Name: Herbert Szumovski
- Contact:
Re: How do i get the Last 24 Hours as a List?
You could use one of the many html to csv table converters on the Internet.
Or: participate in the script enhancement and add the functionality.
Or: participate in the script enhancement and add the functionality.

Who is online
Users browsing this forum: No registered users and 22 guests