Get-Compliance -Entity <Host> takes 8 seconds ?? What about parsing hundreds of hosts, it going to take a long time.
Get-Compliance (Get-Folder -noRecurssion) takes 30 seconds for a vCenter with 8 hosts.
Wondering if something can be done.
HK
Waiting for Mr.LucD for the magical answer 🙂
I'm afraid I will have to disappoint you.
These cmdlets are all based on private APIs, no way to see what is going on.
And this snapin was not developed by the PowerCLI Dev Team, so I wonder if they could give us an answer.
Shall I move the tread to the Update Manager PowerCLI Community ?
Perhaps the team that created this snapin will monitor the threads in there.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Okay, pls move this to the VUM forum.
Thanks 🙂
Done, now let's hope the Update Manager PowerCLI team notices the thread.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
vum powercli folks are on holiday !
Hi harkamal,
If this is the first Update Manager PowerCLI cmdlet you are executing for the current session, at first some initialization steps are performed, connection to the Update Manager server and after that the compliance information is retrieved.
The objects, which Get-Compliance returns, contain these fields: entity, status and baselines. If you have attached host patch baselines to your hosts, the baselines will be retrieved from the server. In addition all information for patches included in these baselines also will be retrieved from the server. So as many patches baselines include, the slower get-compliance is. I suppose that is the reason why Get-Compliance working too slow for you.
About this command Get-Compliance (Get-Folder -noRecurssion). If you have virtual machines and templates in your inventory, the compliance information for them will be also retrieved. Not only for the 8 hosts.
Regards,
Biliana
Thanks a lot.
Can you suggest which method will be more efficient for getting host patch compliance
method1 Get-compliance -entity (get-folder -norecurssion)
Although, the vm's dont have any baelines attached, will this be still an overhead ? We don't need vm patch compliance anyway.
method2 Get-vmhost | get-compliance
this method will iterate for each host (pipeline), will this be a better way ?
Hi Harkamal,
The second method will be faster, than the first. Get-compliance will work only on vmhost objects this way.
Regards,
Nikolay