PowerShell script exchange
Post Reply
gekken
Novice
Posts: 7
Liked: 3 times
Joined: Jun 18, 2013 9:48 am
Full Name: Geir Kåre Sjo

Get network config of VM in backup

Post by gekken »

hi, this is probably an easy one :D

I'm trying to automate some instant VM-recovery stuff. For that process I would like to get the original VM network config, number of vNICs and name. The original vSphere/VM is not available so need to get this info from the backup.

I grab the restorepoint using this command:

$restorepoint = Get-VBRBackup -Name $VBRBackupJob | Get-VBRRestorePoint -name $vm| Sort-Object {$_.creationtime -as [datetime]} | Select -last 1

I then have the restorepoint and can get all kind of info, but I'm not able to find network config :shock:

Anyone?

/GK
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Get network config of VM in backup

Post by david.domask »

Hi @gekken,

Believe what you need is under the AuxData property of COib objects returned by Get-VBRRestorePoint.

$backup = Get-VBRBackup -Name 'name of backup'
$rp = Get-VBRRestorePoint -Backup $backup
$rp.AuxData

Check the Nics property and other properties under AuxData please.
David Domask | Product Management: Principal Analyst
gekken
Novice
Posts: 7
Liked: 3 times
Joined: Jun 18, 2013 9:48 am
Full Name: Geir Kåre Sjo

Re: Get network config of VM in backup

Post by gekken » 1 person likes this post

Hi David

Thank you so much, worked as a charm :)


/GK
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Get network config of VM in backup

Post by david.domask » 1 person likes this post

Glad I could help! Always welcome and good luck with scripting!
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests