VMware Cloud Community
JLoganAllegianc
Enthusiast
Enthusiast
Jump to solution

Looking for a script to get vpxa agent version

I am working with a customer that has a large number of hosts in several vCenter environments. In troubleshooting some issues due to a recent upgrade to VCenter 6.0 U3, I have a need to verify the vCenter agent version on each of the hosts. I can certainly login manually to each one and do something like this:

rpm -qa | grep vpxa

But I would much rather be able to do it through a script. Just curious if this is feasible. I can connect to the hosts in a look and get the appropriate service:

Connect-VIServer -Server MyESXi -User myRootUser -Password myPassword

Get-VMHostService |

    Where {$_.Key -eq "vpxa"}

However I do not see a way to grab the version info. Hoping I am missing something stupid-simple that someone could point out.

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Would this work?

foreach($esx in Get-VMHost){

    $esxcli = Get-EsxCli -VMHost $esx -V2

    $esxcli.software.vib.get.Invoke() | where{$_.Name -eq 'vmware-fdm'} |

    Select @{N='VMHost';E={$esx.Name}},Name,Version,InstallDate

}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

Would this work?

foreach($esx in Get-VMHost){

    $esxcli = Get-EsxCli -VMHost $esx -V2

    $esxcli.software.vib.get.Invoke() | where{$_.Name -eq 'vmware-fdm'} |

    Select @{N='VMHost';E={$esx.Name}},Name,Version,InstallDate

}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
JLoganAllegianc
Enthusiast
Enthusiast
Jump to solution

Thanks, that looks great. I am guessing if this VIB shows an install date that correlates with the date of the vCenter upgrade it is a fair bet the vpxa agent was updated as well?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Yes, that's what I would assume as well.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos