As far as I know the Enterprise Manager has a REST API only and no Powershell interface...
@jcolonfzenpr
I don’t know a way or method to get the enterprise manager with the help of the veeam Powershell Module.
You could get your answer from the vbr sql database if a EM is connected. And you can get also the FQDN. But that’s an unsupported method.
Maybe oleg.feoktistov from veeam can help you in the R&D Forums. He is the real veeam powershell guru
You could leverage netstat or Get-NetTCPConnection to see the connections on port 9392. Exclude the hosts accessing the VBR server using the Veeam Backup & Replication Console from the output and be aware that the connection from the EM server to the VBR server is not permanent.
I wasn’t able to find a way, with Powershell, to check if a VBR server is managed by an Enterprise Manager… the only place where I could find this info is the VBR configuration database (SQL Server).
As already mentioned, interacting directly with the database is unsupported and generally not recommended.
That said, the following Powershell code should not do any harm and just pull the Enterprise Manager info (if any) from the database.
#Query the SQL database to retrieve Enterprise Manager connection info (if any) $info = Invoke-Sqlcmd -ServerInstance <YOUR_VBR_SQL_INSTANCE_HERE> -query "select value from fVeeambackup].kdbo].dOptions] where name = 'EnterpriseServerInfo'"
#Parse and display the info (XML attributes / child nodes) obtained from the database $( xml]$info.value).ChildNodes
Example output:
Note: if the VBR server is not managed by an Enterprise Manager server, the “EnterpriseServerInfo” row and data won’t be present at all.
Nice solution, thank you
Sorry, I’m a little late to the party, but I have a method in PowerShell that doesn’t require calling Invoke-SqlCmd cmdlet as it’s not installed by default in Windows Server (unless you also have SQL installed on the server or have installed manually).
Sorry, I’m a little late to the party, but I have a method in PowerShell that doesn’t require calling Invoke-SqlCmd cmdlet as it’s not installed by default in Windows Server (unless you also have SQL installed on the server or have installed manually).
Sorry, I’m a little late to the party, but I have a method in PowerShell that doesn’t require calling Invoke-SqlCmd cmdlet as it’s not installed by default in Windows Server (unless you also have SQL installed on the server or have installed manually).
Hi folks. This command does not seem to work with 12.0/12.1 and PostgreSQL. The .NET call returns the following:
Exception calling "GetEnterpriseServerInfo" with "0" argument(s): "Object reference not set to an instance of an object ." At line:1 char:1 + [Veeam.Backup.Core.SBackupOptions]::GetEnterpriseServerInfo() | Selec ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : NullReferenceException
Any clues?
Hi folks. This command does not seem to work with 12.0/12.1 and PostgreSQL. The .NET call returns the following:
Exception calling "GetEnterpriseServerInfo" with "0" argument(s): "Object reference not set to an instance of an object ." At line:1 char:1 + [Veeam.Backup.Core.SBackupOptions]::GetEnterpriseServerInfo() | Selec ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : NullReferenceException
Any clues?
Heya! Yeah, in 12.x the command no longer works unless you run any other Veeam cmdlet prior in order to fully load up the modules (Import-Module doesn’t work, either). Here’s the updated way that I use it: