PowerShell script exchange
Post Reply
vbogda
Novice
Posts: 8
Liked: never
Joined: Dec 11, 2014 2:19 pm
Full Name: Val Bogda
Contact:

Restore to original location

Post by vbogda » Dec 11, 2014 2:45 pm

Hi All,

I am looking for a way of finding the original location of a backup object so that I can pass it to the Host parameter of the Start-VBRRestoreVM CmdLet.

Thanks

veremin
Product Manager
Posts: 17077
Liked: 1475 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Restore to original location

Post by veremin » Dec 11, 2014 9:27 pm

I believe you can query backup job to find out job objects, assign required one to a variable, and, then, use something like .GetItem() or .Item to explore vSphere object and information about its original location. Thanks.

vbogda
Novice
Posts: 8
Liked: never
Joined: Dec 11, 2014 2:19 pm
Full Name: Val Bogda
Contact:

Re: Restore to original location

Post by vbogda » Dec 12, 2014 2:03 pm

That's what I thought as well. However, I can't find anything in Object that will give me this information. There's Location but that's not what the Start-VBRRestoreVM command requires.

I found a way of finding the original location by utilising the Find-VBRViEntity command which gives me what I want in VmHostName but it feels like it should be possible to drill down to this information starting from the Backup job.

veremin
Product Manager
Posts: 17077
Liked: 1475 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Restore to original location

Post by veremin » Dec 14, 2014 1:57 pm

Once the required object was assigned have you tried to explore its available methods? Some of them like Item or GetItem() should point to vSphere VM object that contains information about the host VM resides on. Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests