<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Courier New \;color\:\#1F497D";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Courier New";
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Courier New";
        color:#1F497D;}
span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:"Courier New";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D">Just keeping this conversation going…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D">I should start writing my first extension for the Powershell client soon (being held now by a firewall problem that should be fixed in a few days).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D">Has anyone provided a skeleton extension task?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D">It occurred to me that if we have extension tests being run by Windows Scheduler (outside the main client task), the first thing such a test should do, is checking it
 the client service is running (and quitting silently if it’s not).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D">glauber<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Xymon [mailto:xymon-bounces@xymon.com]
<b>On Behalf Of </b>Ribeiro, Glauber<br>
<b>Sent:</b> Friday, November 22, 2013 11:30<br>
<b>To:</b> David Baldwin; xymon@xymon.com<br>
<b>Subject:</b> Re: [Xymon] WinPSClient - Updates?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D">Thanks, David!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D">Are you aware of any concerns that might stop me from using the current Powershell client in the real world?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D">(I understand that it’s pre-production and no guarantees, etc.)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D">glauber<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> David Baldwin [<a href="mailto:david.baldwin@ausport.gov.au">mailto:david.baldwin@ausport.gov.au</a>]
<br>
<b>Sent:</b> Wednesday, November 20, 2013 16:48<br>
<b>To:</b> Ribeiro, Glauber; <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
<b>Subject:</b> Re: [Xymon] WinPSClient - Updates?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">All,<br>
<br>
Apologies on not responding to this.<br>
<br>
The existing XymonPSClient works just fine running its own scheduling. For the most part it also seems to be well behaved and not leak memory - it is fairly proactive about explicit garbage collection. On first run it gathers a number of data items from WMI
 on a much longer refresh cycle and reports them as part of the client report - these items are fairly slow to report and don't change much if at all. While that could be handled by saving and restoring state between runs and using a Scheduled task rather than
 service runner, it makes things more complicated. Also need to consider measures to prevent multiple instances running if Scheduled tasks fire up when the previous one is still running - for example doing the refresh of the long refresh cycle WMI info (maybe
 there's an in-built mechanism for this?).<br>
<br>
External scripts however are much more problematic to manage scheduling for, and using scheduled tasks could be a much better way to handle them.<br>
<br>
David.<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D"">I’m very interested on WinPSClient too. I’m planning to install it on a series of servers that we will be configuring in the next few weeks.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D"">I second the idea of using Windows Task Scheduler.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D"">Has there been any thought on how to enable creating extensions? It could be like what’s done in Unix, or copy what’s done in BBWin.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D"">Thanks!</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D"">glauber</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New \;color\:\#1F497D""> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Xymon [<a href="mailto:xymon-bounces@xymon.com">mailto:xymon-bounces@xymon.com</a>]
<b>On Behalf Of </b>Shea, Graeme A<br>
<b>Sent:</b> Thursday, November 14, 2013 14:31<br>
<b>To:</b> <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
<b>Subject:</b> Re: [Xymon] WinPSClient - Updates?</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">What if instead of “wrapping” a service around it the script ran as a scheduled task every 5 minutes?
</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">For the task properties the command line becomes something like C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">And the argument &'C:\Path_To_Client\</span><span lang="EN-AU">
</span><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">XymonPSClient.ps1'
</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Put a tick in repeat task, set the period to 5 mins and the duration to indefinably. Probably no need to save the password.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The task can be exported as an xml file for import into other systems and/or included in the distribution package.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Regards</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Graeme</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Xymon [<a href="mailto:xymon-bounces@xymon.com">mailto:xymon-bounces@xymon.com</a>]
<b>On Behalf Of </b>David Baldwin<br>
<b>Sent:</b> Wednesday, 13 November 2013 3:55 PM<br>
<b>To:</b> Jason Richards Pagh; <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
<b>Subject:</b> [Xymon] Re: WinPSClient - Updates?</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-AU"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span lang="EN-AU">Jason,<br>
<br>
Thanks for the email.</span><o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span lang="EN-AU">So it looks like the WinPSClient hasn’t been updated in a few months. I had seen a thread from quite a while ago about some issues David was running into, but can’t tell if he’s still around and willing/able to work on
 it.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-AU"> </span><o:p></o:p></p>
</div>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-AU">In principle I am interested, but don't have a lot of time to work on it at present.</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span lang="EN-AU">I’ve been able to get XymonPSClient.exe (aka SrvAny) to run powershell natively as a 64-bit executable. The only change necessary to enable this was changing the PowerShell executable to running as %windir%\sysnative\WindowsPowerShell\v1.0\powershell.exe.
 The sysnative portion prevents a 32-bit program (SrvAny) from being redirected to %windir%\SysWow64. (See <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa384187%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/aa384187(v=vs.85).aspx</a>).</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-AU"> </span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-AU">Thanks - I found the "sysNative" workaround a month or two ago also. Very useful for running PS scripts from BBWin since it is still 32-bit only.</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span lang="EN-AU">I also found a better service wrapper than SrvAny, namely nssm (<a href="http://nssm.cc">http://nssm.cc</a>/). This has the ability to detect if powershell fails and restart it, which is something SrvAny lacks. It also
 comes in both 32-bit and 64-bit versions, so when using the latter the sysnative piece isn’t necessary. I’ve only been working at this for a day or two, so it probably needs more testing, but it looks promising.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-AU"> </span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-AU">That's an awesome improvement. Definitely a big advance :)</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span lang="EN-AU">Is there any work (design contemplation) about how xymonclient.ps1 could handle external scripts? I assume this was just a future phase and not so much a limitation or barrier that hadn’t yet been overcome.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-AU"> </span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-AU">I'd played around with things like start-job in PS, but I hadn't worked through all of the legacy reporting mechanisms from BBNT/BBWin (e.g. writing text files into directory - that's an easy
 one in practice) but more to the point worked out throttling mechanisms for long-running scripts that don't exit, etc. Had also considered just running external scripts as scheduled tasks, but not had time to investigate.<br>
<br>
From memory there were some other issues such as dealing with memory leaks (periodic service restart would solve that).<br>
<br>
David.</span><o:p></o:p></p>
<pre><span lang="EN-AU">-- </span><o:p></o:p></pre>
<pre><span lang="EN-AU">David Baldwin - Senior Systems Administrator (Datacentres + Networks)</span><o:p></o:p></pre>
<pre><span lang="EN-AU">Information and Communication Technology Services</span><o:p></o:p></pre>
<pre><span lang="EN-AU">Australian Sports Commission          <a href="http://ausport.gov.au">http://ausport.gov.au</a></span><o:p></o:p></pre>
<pre><span lang="EN-AU">Tel 02 62147830 Fax 02 62141830       PO Box 176 Belconnen ACT 2616</span><o:p></o:p></pre>
<pre><span lang="EN-AU"><a href="mailto:david.baldwin@ausport.gov.au">david.baldwin@ausport.gov.au</a>          Leverrier Street Bruce ACT 2617</span><o:p></o:p></pre>
<p class="MsoNormal"><span lang="EN-AU"> </span><o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center"><span lang="EN-AU">
<hr size="2" width="100%" align="center">
</span></div>
<p class="MsoNormal"><span lang="EN-AU">Keep up to date with what's happening in Australian sport visit
<a href="http://www.ausport.gov.au">www.ausport.gov.au</a> <br>
<br>
</span><span lang="EN-AU" style="font-size:7.5pt;font-family:"Arial","sans-serif"">This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution,
 copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender.</span><span lang="EN-AU">
</span><o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center"><span lang="EN-AU">
<hr size="2" width="100%" align="center">
</span></div>
<p><b><span lang="EN-AU">Important - </span></b><span lang="EN-AU">This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless
 of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions
 expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Xymon mailing list<o:p></o:p></pre>
<pre><a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><o:p></o:p></pre>
<pre><a href="http://lists.xymon.com/mailman/listinfo/xymon">http://lists.xymon.com/mailman/listinfo/xymon</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>David Baldwin - Senior Systems Administrator (Datacentres + Networks)<o:p></o:p></pre>
<pre>Information and Communication Technology Services<o:p></o:p></pre>
<pre>Australian Sports Commission          <a href="http://ausport.gov.au">http://ausport.gov.au</a><o:p></o:p></pre>
<pre>Tel 02 62147830 Fax 02 62141830       PO Box 176 Belconnen ACT 2616<o:p></o:p></pre>
<pre><a href="mailto:david.baldwin@ausport.gov.au">david.baldwin@ausport.gov.au</a>          Leverrier Street Bruce ACT 2617<o:p></o:p></pre>
</div>
</body>
</html>