# Complex WQL queries in Extension 2.0

**URL:** <https://community.dynatrace.com/t/complex-wql-queries-in-extension-2-0/40241>\
**Category:** Extensions\
**Tags:** wmi, extensions\
**Created:** [June 16, 2023, 7:58am UTC](https://community.dynatrace.com/t/complex-wql-queries-in-extension-2-0/40241 "2023-06-16T07:58:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarjei](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tarjei/32/39196_2.png) [@tarjei](https://community.dynatrace.com/u/tarjei)\
**Post date:** [June 16, 2023, 7:58am UTC](https://community.dynatrace.com/t/complex-wql-queries-in-extension-2-0/40241/1 "2023-06-16T07:58:33Z")

</div>

(Get-WmiObject -Query “select \* from MSCluster\_Resource where type=‘IP Address’” -namespace “root\mscluster”).privateproperties

In Powershell I can quite easily do the following:

```markup
(Get-WmiObject -Query "select * from MSCluster_Resource where type='IP Address'" -namespace "root\mscluster").privateproperties

```

This will provide me with the expanded information from the privateproperties of the MSCluster\_Resource type.

Is it possible to the same using WQL in Extension 2.0?

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [August 3, 2023, 7:56pm UTC](https://community.dynatrace.com/t/complex-wql-queries-in-extension-2-0/40241/2 "2023-08-03T19:56:11Z")

</div>

I dont think so as Dynatrace uses their own language - DQL

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [August 3, 2023, 8:15pm UTC](https://community.dynatrace.com/t/complex-wql-queries-in-extension-2-0/40241/3 "2023-08-03T20:15:43Z")

</div>

DQL is something else than what is being used in the extension framework. WMI declarative extensions uses WQL.

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [August 3, 2023, 8:16pm UTC](https://community.dynatrace.com/t/complex-wql-queries-in-extension-2-0/40241/4 "2023-08-03T20:16:51Z")

</div>

You cannot access additional attributes on the returned query, you’d have to make it all part of the query. Is there a reason that you cannot in this case?

---

<div class="post-metadata">

**Author:** ![tarjei](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tarjei/32/39196_2.png) [@tarjei](https://community.dynatrace.com/u/tarjei)\
**Post date:** [August 14, 2023, 8:34am UTC](https://community.dynatrace.com/t/complex-wql-queries-in-extension-2-0/40241/5 "2023-08-14T08:34:38Z")

</div>

Hi Mike!

As far as I have been able to figure out, there is no way of writing this as a WQL. And believe me I have tried.  
If you have knowledge otherwise please do let me know.

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [August 15, 2023, 12:30pm UTC](https://community.dynatrace.com/t/complex-wql-queries-in-extension-2-0/40241/6 "2023-08-15T12:30:33Z")

</div>

I didn’t try but if it won’t be returned like this I think you’re stuck with Python in EF1, reaching out to our services team for Python in EF2, or setting up a task that feeds the result in through the OneAgent endpoints.

```markup
wmiNamespace: root\mscluster
query: SELECT PrivateProperties FROM MSCluster_Resource WHERE type='IP Address'

```

---

<div class="post-metadata">

**Author:** ![tarjei](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tarjei/32/39196_2.png) [@tarjei](https://community.dynatrace.com/u/tarjei)\
**Post date:** [August 22, 2023, 12:41pm UTC](https://community.dynatrace.com/t/complex-wql-queries-in-extension-2-0/40241/7 "2023-08-22T12:41:11Z")

</div>

Ok,

So basically we are stuck with waiting on DT to release python for ext2 in the wild?  
We have basically 99% of the functionality, but not the remaining 1%
