PowerShell script exchange
karim
Enthusiast
Posts: 51 Liked: 5 times
Joined: Oct 17, 2018 9:01 am
Contact:
Post
by karim » Sep 03, 2019 12:36 pm
this post
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: 3626 Liked: 608 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:
Post
by PetrM » Sep 03, 2019 2:32 pm
this post
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:
Post
by karim » Sep 03, 2019 2:49 pm
this post
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: 20406 Liked: 2299 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Sep 03, 2019 3:16 pm
this post
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:
Post
by karim » Sep 03, 2019 6:56 pm
this post
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:
Post
by karim » Sep 04, 2019 11:59 am
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
Users browsing this forum: No registered users and 7 guests