PowerShell script exchange
Post Reply
Posts: 19
Liked: never
Joined: Jan 18, 2013 3:36 pm
Full Name: Alex Nunley

generating a list of vms

Post by alex.nunley » Jun 25, 2014 6:57 pm

I use this snippet a lot.

Code: Select all

$gen =  $job | get-vbrrestorepoint -name "$vm" 
$gen.creationtimestring > $creationcsv
Works great, most of the time. Finding now, I have an imported set that has the same name as a current job. This enumerates just the ones from the imported backup, not from the current job.

Any way I can change that??

Product Manager
Posts: 17047
Liked: 1470 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: generating a list of vms

Post by veremin » Jun 25, 2014 9:13 pm

How is $Job variable assigned? You might want to get both current and imported job (or backup), see how the differ on low level (have different ID, for instance) and, then, using the differentiator, assign to a variable the one you want to. Thanks.

Post Reply

Who is online

Users browsing this forum: kevz0r and 3 guests