Is it possible to create custom inventory rules that will become html tags?  My goal is to create a dynamic html link.  I understand this is probably taken out by default, but I would like to use it as a feature.

When i do ShellCommandTextReturn() and my command(s) output '<'s, they become converted to &lt in the html source.  I want the '<'.

Thanks in advance,

0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



You will probably need to use a "\" as a break character before the command output string. 

See here for an example: http://www.itninja.com/question/custom-inventory-problems

Answered 09/30/2012 by: jknox
Red Belt

  • I believe my problem is different. "\" is escaping characters that are being sent to be evaluated as part of the script. My script runs fine. However, there seems to be another interpreation after the script has run. The output is then converted. I tried escaping characters in the output to no avail. the result was:
    >7) DeskLocation (CI):</td><td>\&lt;<br/> - in the HTML code
    I want &lt to actually be a < in the HTML code. Is this possible? Is that clear? Thanks for your help.
    • What is the actual CIR?
  • ShellCommandTextReturn(powershell.exe -command "if (Test-Path -path 'SOME PATH TO MY SCRIPT') { write-host "\<" })
    normally instead of write-host I would execute the script but I am just trying to prove the concept first.
    I want the < to show in the html on the K1000 not &lt.. so it may have to do more with the tweaking the webserver on k1000 rather than the CIR or any script.
    • The escape character would go in front of the entire argument, so something like this:

      ShellCommandTextReturn(powershell.exe -command "if (Test-Path -path 'SOME PATH TO MY SCRIPT') { write-host \"<" })

      If that doesn't work, submit a ticket to KACE support so it can be looked into.
  • that does not seem to work.
Please log in to comment

Did you find a solution to this? I'm trying to do something similar in my SQL reports but it appears the report engine defaults everything to text and is doing an HTML conversion to text when generated. I am trying to create HTML links inside my reports but I've had no luck.

Answered 10/15/2012 by: pingpring
White Belt

  • not yet.. still looking into it. seems like a configuration on the output engine
Please log in to comment