I am currently developing a script to check the SSL Cert expiration for multiple Domains. Therefore I wrote a script starting with
param([String[]] $urls) Write-Host "<prtg>" foreach ($url in $urls){ ... } Write-Host "</prtg>"
If I run this directly from powershell .\myScript.ps1 host1.com,host2.de,host3.org it runs perfect. If I add the script as XML Custom EXE/Script Sensor it does not loop through the parameters. Somehow host1.com,host2.de,host3.org is not passed as array. It is passed as string and I get
-736809 # (host1.com,host2.de,host3.org) is below the error limit of....
How do I have to pass the arguments to be looped through the foreach loop?
Kind regards, Steff
Add comment