How can I use Get-VBRBackupSession to get only the last session for a given job?
I could pass a range of dates, but I don't know when a job was executed lasy time...
Regards
marius
-
- Veteran
- Posts: 459
- Liked: 5 times
- Joined: Feb 01, 2012 12:04 pm
- Full Name: Mario
- Contact:
-
- Product Manager
- Posts: 20406
- Liked: 2299 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How to use Get-VBRBackupSession to get only the last ses
You should use CreationTime parameter in arrange list of backup session from the newest to the oldest one, and, then, select the most recent session:
Thanks.
Code: Select all
Get-VBRBackupSession | where {$_.JobName -eq "Name of Job"} | Sort creationtime -Descending | select -First 1
Who is online
Users browsing this forum: No registered users and 10 guests