Question

I am not able to get result set when ASSOCIATORS are used in WMI query using perl script. Can someone please help on this?

 $str = "ASSOCIATORS OF {($cs->Path_)->Path} WHERE resultClass = Msvm_KvpExchangeComponent";
 $components = $wmi->ExecQuery($str); #Here I am not able to find $components
Was it helpful?

Solution 2

i've resolved the above error by changing the code as:

$str = "ASSOCIATORS OF {$cs->{Path_}->{Path}} WHERE resultClass = Msvm_KvpExchangeComponent";
$components = $wmi->ExecQuery($str);

OTHER TIPS

The way to query for KVP data in Server 2012 or 2012 R2 has changed versus how it was in Server 2008, so trying to use the root/virtualization WMI namespace will not work.

http://blogs.msdn.com/b/taylorb/archive/2012/12/05/customizing-the-key-value-pair-kvp-integration-component.aspx

That link shows how the WMI has changed, and how you can query to get the right data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top