Solved

Powershell for getting members of Physical Infrastructure


Userlevel 1

I have a pretty simple request that I just can’t seem to identify the correct command for.

I’m just looking to be able to query what job a system is a member of. It’s very easy to do for any virtual systems, but harder for physical. Connecting and getting the job are easy. And the $Job.BackupObject property contains the Physical Infrastructure object I’m interested in, but not the actual members of the Physical Infrastructure box.

The script:

The Physical Infrastructure Object:


The contents I’m really trying to get:
 

 

icon

Best answer by damien commenge 27 March 2024, 17:13

View original

2 comments

Userlevel 1

Thanks for any help in advance!

Userlevel 6
Badge +4

Hello,

 

This is what I use :

function Get-VeeamProtectionGroupComputers
{
Write-Host "$(Get-Date -Format HH:mm:ss) - Protections Groups Computers view"
$ProtectionGroupsReq = Get-VBRProtectionGroup
foreach ($ProtectionGroup in $ProtectionGroupsReq)
{
$computers = Get-VBRDiscoveredComputer -ProtectionGroup $ProtectionGroup
foreach ($computer in $computers)
{
$CBTDriverVersion = $computer.DriverVersion
[pscustomobject]@{
Name = $ProtectionGroup.name
Computer = $computer.name
AgentVersion = $computer.AgentVersion
IP = $computer.IPAddress.IPAddressToString
AgentStatus = $computer.AgentStatus
Driver = $computer.DriverStatus
CBTVersion = if($null -ne $CBTDriverVersion) {$CBTDriverVersion} else {"<N/A>"}
LastConnected = $computer.LastConnected
}
}
}
Write-host "$(Get-Date -Format HH:mm:ss) --------------------"
}

 

Comment