I'm getting the following error on a custom sensor:
Response not well-formed: "(A command that prompts the user failed because the host program or the command type does not support user interaction. Try a host program that supports user interaction, such as the Windows PowerShell Console or Windows PowerShell ISE, and remove prompt-related commands from command types that do not support user interaction, such as Windows PowerShell workflows. )" (code: PE132)
This is the script I'm running:
#gets the file and its last line $and = (Get-Content \\computername\c$\folder\DB\license.lic)[-1] #separates each value by finding every space $separator = " " #removes repeating separators since there are multiple spaces $opt = [System.StringSplitOptions]::RemoveEmptyEntries #sets the split as a value $drew = $and.Split($separator,$opt) #runs the command and, counting left, writes the sixth position from the far right to a variable for collection, tags it with an identifier for PRTG write-host $drew[6] ":Current Users" #write status of normal to PRTG exit 0
If I add the following to my script, the sensor changes from "Down" to "Up", but it does not return the count I'm looking for:
value:ok
Can anyone offer any suggestions?
Add comment