How to make a proper call into JMS using powershell?

Hi,

I have to build a PowerShell script where it can check if the JMS connectivity is working fine between two servers. I like to know if anyone could help me on, how to make a proper call into JMS using PowerShell or How to call the JMS client using java.exe. I am assuming we can do launching a JAR from within PowerShell, I just don’t know what command line parameters to pass.

Appreciate your response.

Thanks,
Kamal.

Sorry, being totally unfamiliar with JMS or what it is, I couldn’t tell you what command line parameters to pass. This isn’t really a PowerShell question; if you know how to do this from the Cmd.exe command-line, it’d be the same in PowerShell, since PowerShell just uses Cmd.exe to run external commands.

Thanks Don Jones for the quick response. Yes, this isn’t exactly a PowerShell question. It’s about Java launching thru PowerShell. I don’t know java, but I imagine there has to be a way to code a Java JAR/class to make a call to the JMS endpoint and return # of remaining messages in a queue. I guess downloading the ActiveMQ queue status page, and then scraping the output would work but I wonder if I get any expert advice or some examples someone did something like this before.

Btw, I started PowerShell just last month and I bought all your three PowerShell books. The books really brought me interest and get me going to change my career which I been trying for some time. So, glad to thank you personally :). This is the first question on PowerShell on any forum.

Thanks,
Kamal.

Hi Don,

I able to download the ActiveMQ queue status page thru powershell with the below cmd:

Invoke-WebRequest http://s****.com:8**/admin/queues.jsp

I am getting 200 status code and all other details. I want to get just one application queue name and its no of messages with whatever input fields it has. I understand PowerShell understands HTML natively, so we can actually call properties of the web response object to get at what we want. But I haven’t tried. Please let me know if you have any thought on this.

Thanks,
Kamal.

Hi,

I am trying to do web scrap to get a value for of a particular message. Below is the xml content i am interested of all in the webpage, I have to search only the href=“browse.jsp;jsessionid=oillma25wtod1qzbhi3jenj5t?JMSDestination=Consumer.Siebel.VirtualTopic.catalog_changed_events” and within that I want only the first value 0.

I tried ParsedHtmlbytagname for Tr and tried with inner text but nothing working. Kindly let me know if anyone has any thoughts on this.


Consumer.Siebel.VirtualTopic.catalog_changed_ev… Consumer.Siebel.VirtualTopic.catalog_changed_events

0
10
0
0

<a href="browse.jsp;jsessionid=oillma25wtod1qzbhi3jenj5t?JMSDestination=Consumer.Siebel.VirtualTopic.catalog_changed_events">Browse</a>
<a href="queueConsumers.jsp;jsessionid=oillma25wtod1qzbhi3jenj5t?JMSDestination=Consumer.Siebel.VirtualTopic.catalog_changed_events">Active Consumers</a>
<a href="queueProducers.jsp;jsessionid=oillma25wtod1qzbhi3jenj5t?JMSDestination=Consumer.Siebel.VirtualTopic.catalog_changed_events">Active Producers</a>
<a href="queueBrowse/

Consumer.Siebel.VirtualTopic.catalog_changed_events
?view=rss&feedType=atom_1.0" title=“Atom 1.0”>
<a href="queueBrowse/

Consumer.Siebel.VirtualTopic.catalog_changed_events
?view=rss&feedType=rss_2.0" title=“RSS 2.0”>

<a href="send.jsp;jsessionid=oillma25wtod1qzbhi3jenj5t?JMSDestination=Consumer.Siebel.VirtualTopic.catalog_changed_events&amp;JMSDestinationType=queue">Send To</a>
<a href="purgeDestination.action;jsessionid=oillma25wtod1qzbhi3jenj5t?JMSDestination=Consumer.Siebel.VirtualTopic.catalog_changed_events&amp;JMSDestinationType=queue&amp;secret=46be1146-426f-4c4e-beea-8f532fa6e7b6">Purge</a>
<a href="deleteDestination.action;jsessionid=oillma25wtod1qzbhi3jenj5t?JMSDestination=Consumer.Siebel.VirtualTopic.catalog_changed_events&amp;JMSDestinationType=queue&amp;secret=46be1146-426f-4c4e-beea-8f532fa6e7b6">Delete</a>