0 Replies Latest reply on Nov 12, 2013 8:09 AM by Michael Halpin

    Using PowerShell to Create HTML that can be viewed in Orion

    Michael Halpin

      I wanted to just share a method that can be used to view certain ticket information as a resource, within the Orion Console. In the use case below, I am just retrieving all open tickets for a particular tech, but this can be easily modified for other required cases

       

      1. Obtain the Enhanced-HTML CMDLETs and place in the “Documents\WindowsPowerShell\Modules” folder. (There is a standard “Convert-ToHtml” Cmdlet that could be used, but the Enhanced-Html allows the use of CSS etc)
      2. Next log in to Web Help Desk as the tech you wish to use, Under Settings->Techs->My Account click the "edit" icon and generate an “API key”. This will be sent later in the REST request. 
      3. 2013-11-12 14_01_21-EMEA Pre-Sales Help Desk.png
      4. Then, on the machine you wish to use PowerShell from (probably the Orion Server) save the .ps1 file . Edit this file to include the relevant API Key, and also update to point at the correct WHD and Web Servers.
      5. Run the script to create the .html file.  This file should be saved to a web-server, so it can be accessed later (You can also create a scheduled task to update the .html frequently, which would be the most common use case).
      6. Next, to view the information within Orion, add in a Custom HTML Resource, and add in an “iframe” referencing the original html file on the web-server that you created.

      <iframe scrolling="no"  src="http://localhost/whd.html"></iframe>

      custom resource.png

      6. And that's it!

      2013-11-12 13_56_37-WHD Tickets.jpg