PowerShell script exchange
matteu
Veeam Legend
Posts: 824 Liked: 128 times
Joined: May 11, 2018 8:42 am
Contact:
Post
by matteu » Apr 08, 2023 10:45 am
this post
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: 2346 Liked: 555 times
Joined: Jun 28, 2016 12:12 pm
Contact:
Post
by david.domask » Apr 08, 2023 4:46 pm
this post
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: 824 Liked: 128 times
Joined: May 11, 2018 8:42 am
Contact:
Post
by matteu » Apr 08, 2023 6:41 pm
this post
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
Users browsing this forum: No registered users and 11 guests