Author Posts

April 3, 2018 at 9:53 pm

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.

April 4, 2018 at 1:46 pm

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.

April 5, 2018 at 2:03 am

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.

April 5, 2018 at 8:31 pm

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.

April 9, 2018 at 6:49 pm

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

Browse
Active Consumers
Active Producers

Send To
Purge
Delete

———————-