so i see only status as installed in the status column, does it mean no pending right?
A: Correct. Nothing in patchinstallationresources until maintenance is InProgress, then when finished the entries for updates show up.
and is that script covers everything right to get the report of update status of VMs?
A: Unsure. I only looked at the script enough to see what the likely cause of it failing was. What I would suggest is to test it over some time, and do manual cross checks to see that it includes everything you need, and modify as necessary.