Modified my code to the below
foreach (HostSystem scanhost in hostlist)
{
ManagedObjectReference hmor = scanhost.ConfigManager.PatchManager;
HostPatchManager hPman = new HostPatchManager(Client, hmor);
// hPman.ScanHostPatch_Task(https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xmL);
hPman.ScanHostPatch(https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml);
}
But there is still an error in the last parenthesis, stating that is expects ) , ;, and that } is an invalid expression. If I hash out hpman.scanhostpatch line, then the error goes away, which means there is a problem with the line hpman.scanhostpatch.
Is there anyone out here who can help me ?????