generating a list of vms

PowerShell script exchange

generating a list of vms

Veeam Logoby alex.nunley » Wed 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??
alex.nunley
Influencer
 
Posts: 19
Liked: never
Joined: Fri Jan 18, 2013 3:36 pm
Full Name: Alex Nunley

Re: generating a list of vms

Veeam Logoby v.Eremin » Wed 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.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 3 guests