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

generating a list of vms

Post by alex.nunley »

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??
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: generating a list of vms

Post by veremin »

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: No registered users and 13 guests