PowerShell script exchange
Post Reply
meeyou
Influencer
Posts: 22
Liked: never
Joined: Oct 16, 2012 5:47 pm
Full Name: John White
Contact:

Simple Request: Generate a list of restore points

Post by meeyou »

Get-VBRRestorePoint <jobname>?
tsightler
VP, Product Management
Posts: 6009
Liked: 2843 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Simple Request: Generate a list of restore points

Post by tsightler »

Code: Select all

Get-VBRBackup -Name <jobname> | Get-VBRRestorePoint
meeyou
Influencer
Posts: 22
Liked: never
Joined: Oct 16, 2012 5:47 pm
Full Name: John White
Contact:

Re: Simple Request: Generate a list of restore points

Post by meeyou »

Nice. Thank you.

Any parameters for sorting results?
Sethbartlett
Veteran
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: Simple Request: Generate a list of restore points

Post by Sethbartlett »

It's actually done on the backups, not the jobs themselves.

Code: Select all

(Get-VBRBackup | Get-VBRRestorePoint) | Out-File "C:\RestorePoints.txt"
This should output a list of all the restore points to a "RestorePoints.txt" file on your C:\ drive.
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
Martin9700
Influencer
Posts: 17
Liked: 3 times
Joined: Nov 10, 2010 2:18 pm
Full Name: Martin Pugh
Location: Massachusetts
Contact:

Re: Simple Request: Generate a list of restore points

Post by Martin9700 »

meeyou wrote:Nice. Thank you.

Any parameters for sorting results?
Sorting can be done by piping the results into SORT:

Code: Select all

Get-VBRBackup -name "job name" | Get-VBRRestorePoint | Sort VmName
You can see all the available properties and methods by piping into Get-Member:

Code: Select all

Get-VBRBackup -name "job name" | Get-VBRRestorePoint | Get-Member
Martin
www.thesurlyadmin.com
@thesurlyadm1n
meeyou
Influencer
Posts: 22
Liked: never
Joined: Oct 16, 2012 5:47 pm
Full Name: John White
Contact:

Re: Simple Request: Generate a list of restore points

Post by meeyou »

Thanks so much, learning a ton about powershell in general from this thread.
tsightler
VP, Product Management
Posts: 6009
Liked: 2843 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Simple Request: Generate a list of restore points

Post by tsightler »

meeyou wrote:Nice. Thank you.

Any parameters for sorting results?
You have all the capabilities of Powershell at your fingertips for sorting/filtering:

Code: Select all

Get-VBRBackup -Name "<JobName>" | Get-VBRRestorePoint | Sort Name,CreationTime
Will produce output sorted by VM name and then creation date/time in ascending order.

I prefer a little more complex where name is sorted ascending, and creation time in descending order, so that VMs are in alphabetical order, but most recent restore points are listed first:

Code: Select all

Get-VBRBackup -Name "<JobName>" | Get-VBRRestorePoint | Sort Name,@{Expression = {$_.CreationTime}; Ascending = $false}
Post Reply

Who is online

Users browsing this forum: caleb.boyd and 19 guests