# WMI Extension 2.0 to monitor clustered MSMQ

**URL:** <https://community.dynatrace.com/t/wmi-extension-2-0-to-monitor-clustered-msmq/34283>\
**Category:** Extensions\
**Tags:** extensions, queues\
**Created:** [February 25, 2022, 1:04am UTC](https://community.dynatrace.com/t/wmi-extension-2-0-to-monitor-clustered-msmq/34283 "2022-02-25T01:04:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chuan\_sern\_wong](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chuan_sern_wong/32/32488_2.png) [@chuan\_sern\_wong](https://community.dynatrace.com/u/chuan_sern_wong)\
**Post date:** [February 25, 2022, 1:04am UTC](https://community.dynatrace.com/t/wmi-extension-2-0-to-monitor-clustered-msmq/34283/1 "2022-02-25T01:04:20Z")

</div>

Hello,

How do I add the following clustered network name to the WMI extension?

$cluster\_network\_name = ‘msmqDemo’

$env:computername = $cluster\_network\_name

$env:\_Cluster\_Network\_Hostname\_ = $cluster\_network\_name

$env:\_Cluster\_Network\_Name\_ = $cluster\_network\_name

---

<div class="post-metadata">

**Author:** ![Sujit](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/sujit/32/15043_2.png) [@Sujit](https://community.dynatrace.com/u/Sujit)\
**Post date:** [March 25, 2022, 3:57pm UTC](https://community.dynatrace.com/t/wmi-extension-2-0-to-monitor-clustered-msmq/34283/2 "2022-03-25T15:57:14Z")

</div>

[@chuan\_sern\_wong](https://community.dynatrace.com/user/28514)&nbsp;Did you find the solution??

Thanks,

Sujit Singh

---

<div class="post-metadata">

**Author:** ![chuan\_sern\_wong](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chuan_sern_wong/32/32488_2.png) [@chuan\_sern\_wong](https://community.dynatrace.com/u/chuan_sern_wong)\
**Post date:** [March 31, 2022, 1:13am UTC](https://community.dynatrace.com/t/wmi-extension-2-0-to-monitor-clustered-msmq/34283/3 "2022-03-31T01:13:23Z")

</div>

Yes, I have write a powerscript.ps to run every min as a schedule task which inget the collected MSMQ messages count.. I used the&nbsp; [https://www.dynatrace.com/support/help/how-to-use-dynatrace/metrics/metric-ingestion/ingestion-methods/local-api](https://www.dynatrace.com/support/help/how-to-use-dynatrace/metrics/metric-ingestion/ingestion-methods/local-api) which is simple to work on. The issue is there’s a need to set the following env in order to query the clustered MSMQ correctly. Hence, WMI extension is not able to meet this requirement.

$env:computername = $cluster\_network\_name

$env:\_Cluster\_Network\_Hostname\_ = $cluster\_network\_name

$env:\_Cluster\_Network\_Name\_ = $cluster\_network\_name

---

<div class="post-metadata">

**Author:** ![ben\_davidson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ben_davidson/32/20391_2.png) [@ben\_davidson](https://community.dynatrace.com/u/ben_davidson)\
**Post date:** [July 22, 2022, 4:42pm UTC](https://community.dynatrace.com/t/wmi-extension-2-0-to-monitor-clustered-msmq/34283/4 "2022-07-22T16:42:41Z")

</div>

Are you able to share the powershell script that you are using for this metric collection?

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [July 23, 2022, 7:07am UTC](https://community.dynatrace.com/t/wmi-extension-2-0-to-monitor-clustered-msmq/34283/5 "2022-07-23T07:07:44Z")

</div>

Hi&nbsp;[@ben\_davidson](https://community.dynatrace.com/user/7787)&nbsp;,

You can download&nbsp;&nbsp;[Microsoft Message Queuing (MSMQ)](https://www.dynatrace.com/hub/detail/microsoft-message-queuing-msmq/?query=msmq)&nbsp;extension (V2 WMI) and look into the YAML

We are using the attached V1 extension and it work fine for us.

HTH

Yos&nbsp;  
[custom.python.msmq.zip](https://community.dynatrace.com/uploads/short-url/q0euUiLPruL9aLOlb1a8IaxOAsJ.zip) (9.88 KB)
