Hey guys,
I am having issues using the QueryComplianceStatus method from ComplianceManager. I have tried to use it with both a profile and entity, but each time it continues to generate the error: "Cannot find an overload for "CheckCompliance" and the argument count: "1"
Here is the link to Compliance Manager and the methods.
Here is the exact error:
PowerCLI C:\> $compMgr.CheckCompliance($clustermoref)
Cannot find an overload for "CheckCompliance" and the argument count: "1".
At line:1 char:25
+ $compMgr.CheckCompliance <<<< ($clustermoref)
+ CategoryInfo : NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId : MethodCountCouldNotFindBest
The object in $clustermoref is a managedobject and points back to a cluster object reference that I want to pull the compliance info for.
My end result is trying to pull the cluster profile compliance status for each host and cluster object, without having to generate a check compliance task to scan each object. I just want to know what the current cluster compliance status is for those objects. If there is a better way to execute this I am all ears.
Thanks in advance.