PowerShell script exchange
Post Reply
matteu
Veeam Legend
Posts: 725
Liked: 118 times
Joined: May 11, 2018 8:42 am
Contact:

Find Enterprise manager server name

Post by matteu »

Hello,

Until version 11 I use this PS cmdlet to find what is the EM server :

Code: Select all

[Veeam.Backup.Core.SBackupOptions]::GetEnterpriseServerInfo()

From version 12 it's not working anymore and I got an error "null reference exception".

What is the way to find the EM server name + URL with V12 with powershell ?

If there is something possible to find it from VBR I would like to know it too :) (I only know SQL + powershell)

This SQL query work

Code: Select all

$VeeamSQLInstance = "veeam\veeamsql2012"

$info = Invoke-Sqlcmd -ServerInstance $VeeamSQLInstance -query "select value from [Veeambackup].[dbo].[Options] where name = 'EnterpriseServerInfo'"
([xml]$info.value).ChildNodes
Thanks
david.domask
Veeam Software
Posts: 1226
Liked: 323 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Find Enterprise manager server name

Post by david.domask »

Hi @matteu,

I have a suspicion you're hitting the situation here: post480167.html#p480167

Please try the workaround, then you should be able to use the same .NET Reflection.
David Domask | Product Management: Principal Analyst
matteu
Veeam Legend
Posts: 725
Liked: 118 times
Joined: May 11, 2018 8:42 am
Contact:

Re: Find Enterprise manager server name

Post by matteu »

Hello,

Thanks for the answer.
Totally right, it's working perfectly if I execute one Veeam powershell command before :

Connect-VBRServer
[Veeam.Backup.Core.SBackupOptions]::GetEnterpriseServerInfo()

Thanks for the answer
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests