VMware Cloud Community
thanosazlin
Contributor
Contributor

powercli vmware.vim.dll call that is similar to vihostupdate.pl ??

i am a newbie C# programmer. i started using vmware.vim.dll and was able to connect to my vcenter host and pull out the hostname and version of the ESX hosts.

my next issue is need to be able to issue an api call similar to the following vsphere cli script:

vihostupdate.pl -q --server <ipaddress of ESX server> --username <needs to be root> --password <password> --query

this query command would show me if a particular bulletin was load on the host or not on  a host

i need to be able to issue a call against each esx host i find and determine if a certian bulletin was load

can anyone point me to the right object or better yet any code that would do the same in vmware.vim.dll? much thx.

Reply
0 Kudos
2 Replies
RvdNieuwendijk
Leadership
Leadership

I don't know how to do it in C#, but in PowerCLI you can give the following command to retrieve the installed patches on all your ESX servers, like the vihostupdate.pl -q command in the vSphere CLI:

Get-VMHost | Get-VMHostPatch | Select-Object -Property VMhost,Id

Regards, Robert

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
Reply
0 Kudos
LucD
Leadership
Leadership

I suspect you want to find the call behind the Get-Compliance cmdlet.

This is part of the Update Manager snapin, so you'll have to use another DLL.


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

Reply
0 Kudos