Hi,
I created a custom DNS sensor for SRV Queries. I tried my query in PS and it worked, but when I put it in PRTG I have error about structural error in XML file, but I think that XML file is correct.
My code is
$Node = Resolve-DnsName xxxxxx -Type SRV | Format-List | findstr NameTarget <prtg>
$value = $Node.split(':')[1]
$xml_txt = "<prtg> <result> <channel>DnsName</channel> <value>+$value+</value> </result> </prtg>"
Write-Host $xml_txt </prtg>
Add comment