sure see below
seperately are you running the same PRTG verison as this issues only started when i did the latest update
Thanks,
script =======================
#Example
#-RemoteHost "192.168.0.55" -Commands "username","password","cat /proc/analog/value1"
Param (
[Parameter(ValueFromPipeline=$true)]
[String[]]$Commands = @("username","password","disable clipaging","sh config"),
[string]$RemoteHost = "HostnameOrIPAddress",
[string]$Port = "23",
[int]$WaitTime = 1200
)
#Write-Host $Commands[1]
Write-Host $Commands
Write-Host $RemoteHost
#exit 0
log =================================
Data['exefile'].asString := 'TelnetMFIcatvalue.ps1';
Data['exeparams'].asString := '-Commands 'ubnt','ubnt','cat /proc/analog/value4' -RemoteHost '172.20.1.188'';
Data['exeparamscache'].asString := '-Commands 'ubnt'`,'ubnt'`,'cat /proc/analog/value4' -RemoteHost '172.20.1.188'';
Data['exeparamshash'].asString := '0be9715e67aeaae989eb16e4205b2d88b92792c9';
Data['fastcount'].asString := '0';
Data['host'].asString := '172.20.0.23';
Data['hostv6'].asString := '';
Data['inerror'].asString := '1';
Data['interfacenumber'].asString := '';
Data['inum'].asString := '';
Data['ipversion'].asString := '0';
Data['isexesensor'].asString := '1';
Data['lastmsg'].asString := '#O132 (ubnt 172.20.1.188 New-Object : Cannot convert argument "1", with value: ",ubnt,cat /proc/analog/value4", for "TcpClient" to type "System.Int32": "Cannot convert value ",ubnt,cat /proc/analog/value4" to type "System.Int32". Error: "Input string was not in a correct format."" At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\TelnetMFIcatvalue.ps1:23 char:15 + ... $Socket = New-Object System.Net.Sockets.TcpClient($RemoteHost, $Por ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [New-Object], MethodExcept ion + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.Power Shell.Commands.NewObjectCommand )';
Data['lastuptime'].asString := '0';
Add comment