PowerShellTrueSight

TIP: Using TrueSight QueryEventByID and RetrieveQueryResults Complex Types in PowerShell

Recently I was working on piece of code which retrieves TrueSight alert information. I got stuck with “Invalid Long Type:” – Doesn’t make sense right? Come lets see it detail!

Consider you have an alert ID like “mc.pncell_[HOSTNAME].1a5ed3bb.0” using the below snippet you can retrieve the result (resultHandle)

We need the resultHandle for RetrieveQueryResults operations. Now let me produce the issue.

Error: The remote server returned an error: (500) Internal Server Error.

If we redo the same in SOAP UI below error appears

Solution is very simple – All the parameters are mandatory! Error is bit mis-leading

Hope this helps for someone who needs a fix Enjoy PowerShell 🙂 – On a side note I didn’t follow this article.

Leave a Reply

Your email address will not be published. Required fields are marked *