PowerShell script exchange
Post Reply
Tarandeep
Novice
Posts: 9
Liked: never
Joined: Mar 26, 2021 12:49 pm
Full Name: Tarandeep Singh
Contact:

Start-VBRInstantRecovery : Host 10.**.**.** was not found in heirarchy

Post by Tarandeep »

I have been trying to run instant recovery from powershell.
I have been getting this error: Host 10.**.**.** was not found in the hierarchy
Veeam version 11
HannesK
Product Manager
Posts: 14839
Liked: 3085 times
Joined: Sep 01, 2014 11:46 am
Full Name: Hannes Kasparick
Location: Austria
Contact:

Re: Start-VBRInstantRecovery : Host 10.**.**.** was not found in heirarchy

Post by HannesK »

Hello,
it's hard to say what went wrong without information about the script... looks like the server was not found (Get-VBRServer). Pasting the script would help to get better answers.

Helpcenter has examples here

Best regards,
Hannes
Tarandeep
Novice
Posts: 9
Liked: never
Joined: Mar 26, 2021 12:49 pm
Full Name: Tarandeep Singh
Contact:

Re: Start-VBRInstantRecovery : Host 10.**.**.** was not found in heirarchy

Post by Tarandeep »

I can find the server with get-vbrserver command.

here is the script

Code: Select all

$job = Get-VBRJob -Name "Job name"
$backup = $job.getLastBackup()
$devices = $backup.GetObjectOibsAll()
$restorepoint = Get-VBRRestorePoint -Backup $backup -ObjectId $devices[1].ObjId
Start-VBRInstantRecovery -RestorePoint $restorepoint[0] -Server 10.200.0.200
soncscy
Veteran
Posts: 643
Liked: 312 times
Joined: Aug 04, 2019 2:57 pm
Full Name: Harvey
Contact:

Re: Start-VBRInstantRecovery : Host 10.**.**.** was not found in heirarchy

Post by soncscy »

Hi Tarandeep,

>I can find the server with get-vbrserver command.

You need to fix this first then. If the cmdlet cannot resolve it, then likely it means just that: Veeam isn't sure which host this is. Copy the Host name from the UI exactly as it shows and try it with Get-VBRServer -Name.

Else, run Get-VBRServer without any arguments and see if it shows in the list. If not, then you need to check why.
Egor Yakovlev
Product Manager
Posts: 2579
Liked: 708 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Location: Prague, Czech Republic
Contact:

Re: Start-VBRInstantRecovery : Host 10.**.**.** was not found in heirarchy

Post by Egor Yakovlev » 1 person likes this post

As Hannes said, server object should be retrieved, so instead of <string> feed Start... with <CHost> object.

Code: Select all

$server = Get-VBRServer -Type ESXi -Name server.name.exactly.as.added.to.vbr.console.local
Start-VBRInstantRecovery -RestorePoint $restorepoint[0] -Server $server
/Cheers!
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Start-VBRInstantRecovery : Host 10.**.**.** was not found in heirarchy

Post by oleg.feoktistov »

Hi Tarandeep,

Adding to the replies above, I just wanted to highlight that most of the parameters across the cmdlets we have, which accept objects of precise types, cannot convert string values to objects of needed types. You have to get these objects directly first.

Thanks,
Oleg
Tarandeep
Novice
Posts: 9
Liked: never
Joined: Mar 26, 2021 12:49 pm
Full Name: Tarandeep Singh
Contact:

Re: Start-VBRInstantRecovery : Host 10.**.**.** was not found in heirarchy

Post by Tarandeep »

Hi Oleg,
Server that I am looking is available in the list obtained from Get-VBRServer.
I also tried to use the server object itself. But it does not work. It gives same error
Egor Yakovlev
Product Manager
Posts: 2579
Liked: 708 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Location: Prague, Czech Republic
Contact:

Re: Start-VBRInstantRecovery : Host 10.**.**.** was not found in heirarchy

Post by Egor Yakovlev »

"Host not found in hierarchy" means that Get-Server failed to find correct entry.
Make sure you are searching -Name exactly as it is listed in VBR UI(server name or IP address, with domain suffix or without it, etc...)
$server should return a single esxi host object, not a list.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests