PowerCLI

 View Only

 Get all fields from vCenter Details in the Summary tab with PowerCLI

Jump to  Best Answer
DanBalboa's profile image
DanBalboa posted Oct 31, 2024 02:51 PM

I need your help to find how to retrieve the "Last Updated" and the "Last File-Based Backup" fields.
I'm able to get all the other ones.

LucD's profile image
LucD  Best Answer

You can use the REST API, make sure to do a Connect-CisServer first.

$sys = Get-CisService -Name 'com.vmware.appliance.system.version'
$rec = Get-CisService -Name 'com.vmware.appliance.recovery.backup.job'
[PSCustomObject]@{
  'Last updated' =  $sys.get().install_time
  'Last file-based backup' = $rec.get(($rec.list() | Select -First 1)).end_time
}
DanBalboa's profile image
DanBalboa

Thank you so much! :)