PowerShell script exchange
Post Reply
karim
Enthusiast
Posts: 51
Liked: 5 times
Joined: Oct 17, 2018 9:01 am
Contact:

howto select a restore point with date

Post by karim »

hello,
i would like to select a restore point with the date, i know there is the CreationTime but i don't know how to select it :(

i can get the restore points list for the vm:

Code: Select all

Get-VBRBackup -Name "backup_1" | Get-VBRRestorePoint -Name vm71
sorry im not a powershell expert

thank you for your help
PetrM
Veeam Software
Posts: 3262
Liked: 526 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: howto select a restore point with date

Post by PetrM »

Hello!

You can try to add "Select-Object" cmdlet:

Code: Select all

Get-VBRBackup -Name "backup_1" | Get-VBRRestorePoint -Name vm71 | Select-Object VMName, CreationTime
Thanks!
karim
Enthusiast
Posts: 51
Liked: 5 times
Joined: Oct 17, 2018 9:01 am
Contact:

Re: howto select a restore point with date

Post by karim »

thank you for your reply but my question was not well explained
i want to select the restore point at the date 25/08/2019 for mounting the backup with IR
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: howto select a restore point with date

Post by veremin »

Try this one-liner:

Code: Select all

Get-VBRBackup -Name "backup_1" | Get-VBRRestorePoint -Name vm71 | where {$_.CreationTime -like "*25/08/2019 *"}
Thanks!
karim
Enthusiast
Posts: 51
Liked: 5 times
Joined: Oct 17, 2018 9:01 am
Contact:

Re: howto select a restore point with date

Post by karim »

i've already tried this line :( but i don't know why the result is always empty (i got a restore point for this date)
i can filter all properties but not the CreationTime.
karim
Enthusiast
Posts: 51
Liked: 5 times
Joined: Oct 17, 2018 9:01 am
Contact:

Re: howto select a restore point with date

Post by karim » 1 person likes this post

got it :)
$restorepoint = Get-VBRBackup -Name "backup_1" | Get-VBRRestorePoint -Name vm71
$restorepoint |Select-Object |where {($_.CreationTime|get-date -Format 'dd/MM/yyyy hh:mm:ss') -like "25/08/2019 *"}
thank you for your help
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests