Solved

whatsup gold powershell script

Posted on 2014-01-13
2
1,418 Views
Last Modified: 2014-02-20
Hello,

Im using whatsup gold v16 , i am trying to make a active monitor via powershell that will run a command called sipsak from the command line, and if it returns "SIP ok" then the monitor is up, and if it reports back "SIP failure" then the monitor is down. here is the command running in powershell. i just dont know how to script it in whatsup gold. can someone help?

PS C:\> & "C:\sipsak-0.9.5.exe"  -s sip:1234567890@173.251.68.100 -N -D 1
SIP ok
PS C:\> & "C:\sipsak-0.9.5.exe"  -s sip:1234567890@173.251.68.2 -N -D 1
nothing received, select returned error
SIP failure
PS C:\>

i cant seem to find online how to do this, and i dont know powershell at all.

Thanks in advance,
Dave
0
Comment
Question by:WCGS_Operations
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

Accepted Solution

by:
Qlemo earned 500 total points
ID: 39792383
I don't have any clue about Active Scripting in WUG, but from the examples I've seen you need to use $Context to get and set values from/to WUG. So your script would look like this:
$result = C:\sipsak-0.9.5.exe -s sip:1234567890@173.251.68.100 -N -D 1
if ($result -eq "SIP ok") {
  $Context.SetResult(0,"SIP ok")
} else {
  $Context.SetResult(1, "SIP failure: $($result -join ""`n"")"
}

Open in new window

Store that into a .ps1 file, and provide that script with full path to the action for monitoring  in WUG.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question