PowerShell script exchange
Erwin Linker
Service Provider
Posts: 125 Liked: 11 times
Joined: Mar 30, 2016 12:58 pm
Full Name: Erwin Linker
Location: The Netherlands
Contact:
Post
by Erwin Linker » Sep 16, 2020 2:23 pm
this post
Hi All,
I'am busy with making a Powershell scripts that reads all the VM's that are in a Job and gets al off the restorepoints from that VM. At this moment is use the following command;
But the command feels slow, i takes a long time to complete. Is there a way to get the information a bit faster?
jhoughes
Veeam Vanguard
Posts: 282 Liked: 113 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Castle Rock, CO
Contact:
Post
by jhoughes » Sep 16, 2020 2:28 pm
this post
Specify the 'Backup' parameter, and your results will be limited to the restore points from a particular backup.
You can get your job, the backups for the job, then the restore points.
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion
chris.arceneaux
VeeaMVP
Posts: 695 Liked: 374 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:
Post
by chris.arceneaux » Sep 16, 2020 2:31 pm
1 person likes this post
Here's a PowerShell trick to speed things up:
Code: Select all
$rps = Get-VBRRestorePoint
$rps | Where-Object {$_.Name -eq "TestVM"}
Essentially, you are gathering all Restore Points in one go in the first line. Then, when you want to pull information for a specific VM, you're referencing the already gathered data.
Erwin Linker
Service Provider
Posts: 125 Liked: 11 times
Joined: Mar 30, 2016 12:58 pm
Full Name: Erwin Linker
Location: The Netherlands
Contact:
Post
by Erwin Linker » Sep 16, 2020 6:06 pm
1 person likes this post
Hi Chris,
I looks that the proces is a lot quicker
.
Users browsing this forum: No registered users and 23 guests