<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[External Parameter Help]]></title><description><![CDATA[<p dir="auto">I am trying to get a powershell script to run but I am receiving a communication error.  I have a folder on my test host called c:\scripts with two .ps1 files.  I have the following on the test host's config:</p>
<p dir="auto">ExternalParameter = Testing:"C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" "C:\Scripts\testing.ps1"<br />
ExternalParameter = Testing2:"C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" "C:\Scripts\testing2.ps1"</p>
<p dir="auto">Testing returns a value but Testing2 produces a communication error.  I have ran testing2.ps1 on the local machine and it returns a value.  I have also ran the testing2.ps1 off of the machine hosting the netxms console.</p>
<p dir="auto">testing2.ps1</p>
<p dir="auto">$a = Get-Counter -Computername valandil -Counter "\Network Interface(my adapter goes here)\Bytes Total/sec" -sampleinterval 1 | ForEach-Object{$_.CounterSamples[0].CookedValue}<br />
$b = Get-Counter -Computername valandil -Counter "\Network Interface(my second adapter goes here)\Bytes Total/sec" -sampleinterval 1 | ForEach-Object{$_.CounterSamples[0].CookedValue}</p>
<p dir="auto">$ab = $a+$b<br />
$ab = "{0:F0}" -f $ab<br />
$ab</p>
<p dir="auto">I have a need to take two perfmon counters and add them for a single value.  How can I fix the communication issue OR is there a way two add two counters together a different way?</p>
]]></description><link>https://forum.netxms.org/topic/2297/external-parameter-help</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 08:49:00 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2297.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 Apr 2013 19:18:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to External Parameter Help on Fri, 19 Apr 2013 19:12:31 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, this worked perfectly.</p>
]]></description><link>https://forum.netxms.org/post/10100</link><guid isPermaLink="true">https://forum.netxms.org/post/10100</guid><dc:creator><![CDATA[Rabid]]></dc:creator><pubDate>Fri, 19 Apr 2013 19:12:31 GMT</pubDate></item><item><title><![CDATA[Reply to External Parameter Help on Sun, 14 Apr 2013 22:14:28 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Most likely timeout for agent command is too small (by default it's two seconds, so reading two perf counters with 1 second interval between samples for each will not fit). There was few discussions about agent timeout intervals on the forum. In short summary, two timeouts should be set correctly:</p>
<p dir="auto">a) ExecTimeout on agent - timeout for executing external program<br />
b) AgentCommandTimeout on server - timeout for any command sent from server to client</p>
<p dir="auto">In general AgentCommandTimeout must be greater or equal to ExecTimeout.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/10080</link><guid isPermaLink="true">https://forum.netxms.org/post/10080</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Sun, 14 Apr 2013 22:14:28 GMT</pubDate></item></channel></rss>