HTML Content in Powershell HTML Output

How do I include HTML tags in the table output generated by the ConvertTo-HTML command?
For example, if I had an array of objects like this:
FriendlyName,URL
Microsoft,www.microsoft.com
Google,www.google.com
Yahoo,www.yahoo.com
How could I make my ConvertTo-Html output something like this:
<a href="www.microsoft.com">Microsoft</a>
<a href="www.google.com">Google</a>
<a href="www.yahoo.com">Yahoo</a>
I have already tried making another property on my objects (OutHTML) with a string of "<a href=" + [char]34 + $URL + [char]34 + ">" + $FriendlyName + "</a>"
Unfortunately, ConvertTo-Html does its job too well and it converts all of my HTML tags to use &lt; and &gt; so that the < and > will display on the webpage!  Thanks for your help!

Thank you, that looks like it does exactly what I need!  Can you tell me if I'm correctly understanding what's going on in their example?
$pso = New-Object PSObject -Property @{
SiteUrl = $spweb.url
PageTitle= $PageTitle
PageUrl = "<a href='$PagesUrl'>$PageTitle</a>"
} | ConvertTo-Html
Add-Type -AssemblyName System.Web
[System.Web.HttpUtility]::HtmlDecode($pso) |
Out-File \\myfolder\InventoryReports\$CurrentMonth.html
At first, they generate the powershell object with the desired properties (including a property for the formatted hypertext output), which is then converted in place to HTML.  It then loads the .Net framework System.Web class so that they can access
the HtmlDecode() method.  They pass the HTML'ified $pso to that method, which searches through $pso for any HTML special characters (the &gt, &lt, etc.) and replaces them with the actual characters, then writes the modified string out to a file.
 Thanks for your help!

Similar Messages

  • Can SQL Developer be used for Oracle Support "HTML Output" Diag Scripts ?

    Hi All,
    Oracle Support has asked me to run a diagnostic script (OTL_Diag.sql for anyone familar with the script) that produces output in HTML format using SQL*Plus to help troubleshoot an OTL problem we are having. Unfortunately I don't have SQL*Plus installed and my company is not on board with me installing it because of the SQL*NET connection required. Instead I have access to SQL Developer 3.1.0.7. While this works fine for most situations I'm having problems generating the required .html output file that Support needs.
    I've tried runing the OTL_Diag.sql a couple of ways using SQL Developer. First, I opened the file from SQL Developer and using the Run Script functionality (F5) I executed the code that way. This method did give me an opportunity to input the necessary parms and it did create the 'start' of the HTML file on my (Windows) file system, but the script seemed to abort with a java error that indicated some sort of format error (sorry, I'm not a java person so I can't provide any more info, but I'll be glad to get the exact error message if anyone thinks that will help solve my issue).
    My second approach was to open a SQL Window where I typed in @C:\OTL_Diag.sql without quotes. This approach also gave me the opportunity to enter the necessary input parms and it seemed to end normally. It also created the 'start' of the diaganostic output file on my Windows file system, but it 'completed' before any of the 'real' diaganostic output was written to the .html file.
    The Metalink note clearly specifies that the OTL_Diag.sql script is to be run with SQL*Plus 10.2 or above so I don't think I can complain too loudly to Oracle about this...but given that I don't have access to this product (and it is useless for me to again ask to install it) I am hoping someone out there has some ideas or insight as to how I can use SQL Developer to execute this diag script in a manner that will produce the required .html output file.
    Thanks in advance to anyone taking time to read my post !!
    Jeff
    Edited by: user13111861 on Jul 10, 2012 6:43 PM
    Edited by: user13111861 on Jul 10, 2012 7:51 PM

    >
    As a result, at this point in time my only available tool to run the OTL_Diag.sql script (provided by Oracle Support) is SQL Developer
    >
    Then you will have to edit the script, break it into pieces, execute each piece manually and save the output to feed into the next piece as required based on what the script is actually doing. Don't post the script or contents as that will likely violate your support agreement.
    As I already mentioned the script may be using syntax and/or commands that are simply not supported by sql*developer. One likely area is the script may be producing intermediate output scripts that are then processed by a later portion of the script. If that is the case then my suggestion to execute the pieces manually should work but you will need to do some trial-and-error to see.
    Even if you appear to be successful you will still have an issue when you communicate the results of your 'test' to Oracle support and they determine you didn't follow their instructions to use the proper tool.
    Sounds like your management is either ignorant or incompetent so I suggest you cover yourself by documentating the instructions from Oracle support and the direct orders you were given to disregard those instructions. No need to discuss that issue further but clearly there are resources available somewhere in the org that has the proper privileges or they wouldn't be able to maintain and support the database. If they want to pay for support they should heed their advice. Nuff said.

  • Page info in HTML output

    Hi,
    Is it possible to show the page information (page number, repeating header and footer) in the HTML output?
    I created a RTF template included page number,header and footer, which are displayed correctly in PDF formatted output.(Header and footer repeating in each page.) When generating HTML formatted output, the page number will always be 1 and header/footer are displayed just once. It seems that HTML formatted output is just one page.
    Is it possible for HTML formatted output to show the same content(each page number, repeating header and footer) as PDF formatted output?
    (XML publisher version is 5.5.)
    Thanks in advance.
    Best regards,
    Zhxiang.
    Message was edited by:
    zhxiangxie
    Message was edited by:
    zhxiangxie

    HTML has only one page output.
    You probably have to define a number of lines for one page and figure out when this number is reached to "send" a page number to the report.

  • How to get the size of JSP html output?

    Hi,
    Is there a JSP method to get the size of JSP HTML output.
    e.g. I would like to print the size of the JSP e.g.
    Size of this page is <%=pageContext.getPageSize()%> Kb ???
    Any ideas? Thanks.
    George
    Edited by: googchro on Jan 5, 2010 4:45 PM

    Would you like to print "the size of this page is..." before or after you calculate the size of the page.
    Because adding that bit of text to the page will make the page bigger...
    Doing it in java, the best approach would probably to have a filter counting the number of bytes that gets sent to the writer/output stream.
    A client side tool measuring the amount of bytes received would probably be easier though.
    You can always look at the Content-length header sent with a response. Though you normally don't have access to that on the java/jsp side, as it is sent by the container.
    cheers,
    evnafets

  • $$PlaceHolder$$ in  RH7 HTML output

    Help!. We have recently upgraded from RH6 to RH7 (as part of
    Adobe Tech Comm Suite). Opening a RH6 project with RH7 all seems OK
    (topics, template, TOC, etc.) until I try closing and/or saving a
    topic. At this point -even if I've made no changes to the topic nor
    to the template- I am noticed that changes have been made to the
    header and footer and I am prompted to "apply the modification" to
    either "all the topics created from the template" or "only to the
    current topic". No matter what option I choose, every time I work
    with the same topic/s I have to repeat the whole process. Then,
    when I generate the HTML output, the text "$$PlaceHolder$$" appears
    instead of the header and footer. All the other features (Topic
    contents, TOC, Glossary, Browse sequences) are displayed properly.
    Note that header and footer look OK in Preview mode!
    About configurations: I have unistalled RH 6 before
    installing RH7; RH7 is version 7.01.001; my OS is Windows XP Pro
    (2002 with SP2).
    I don't know what to do other than going back to RH6. Please
    help!

    We have the same issue... the auto-update Date field in the
    footer causes the template warning message in RH 7. We have never
    had this problem before (all the way back to RoboHelp 9 and X5).
    Colum, you wrote:
    quote:
    A template is just standard text that can be applied to a
    topic.
    Well, that's partly true. A template is used to enforce
    headers, footers, and styles. Standard text, not included in a
    header and footer is only good once--if the template's body
    changes, that doesn't get pushed to topics (unless the standard
    text is included in a snippet); header and footer changes are
    pushed. So, I guess my point is that the templates are used to
    enforce a "corporate look". If you alter that look or delete
    standard text/variables, then you should be prompted with the
    warning. I'd imagine that for many authors, these warnings come as
    a surprise in RH 7. The content of the template really hasn't
    changed, just the value of a variable.

  • Stop desktop's title from getting rendered in the final HTML output

    Is there a way to stop the desktop's title value from being rendered and displayed in the HTML source of the page? I don't want to use a backing file to achieve this -- looking for a simple easy configuration to remove all the desktop property definitions from getting rendered to the final HTML output.
    Specifically trying to remove the title:
    <title >Microsite Desktop</title>
    <meta name="bea-portal-meta-skeleton" content="/framework/skeletons/testmicrositeskel"/>
    <meta name="bea-portal-meta-skin" content="/framework/skins/testcardsskin"/>
    <meta name="bea-portal-meta-skin-images" content="/framework/skins/testcardsskin/images"/>
    Edited by sjayas01 at 12/18/2007 8:38 AM

    Try this function.
    data: label type string.
    CALL FUNCTION 'DDIF_FIELDLABEL_GET'
      EXPORTING
        tabname              = 'MARA'
        FIELDNAME            = 'MATNR'
    *   LANGU                = SY-LANGU
    *   LFIELDNAME           = ' '
      IMPORTING
        LABEL                = label.
    Regards,
    Rich Heilman

  • Opening Excel(HTML) output in Excel

    I have an issue whereby my Excel(HTML) output from XMLP is opening in a web browser rather than Excel. I've been through some previous threads on the same issue and many of them mention setting up a 'new viewer' or somesuch as the solution.
    I'm not familiar with that terminology so I'm guessing it a piece of eBusiness Suite functionality. Unfortunately I'm using PeopleSoft and I can't see anything comparable.
    What I have found however is that if you manually alter the header of the output file it works perfectly. i.e. the header looks like this:
    <html>
    <!-- Generated by Oracle XML Publisher 5.6.2 -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Title</title>
    If I change the 4th line to read:
    <meta http-equiv="Content-Type" content="application/vnd.ms-excel"; charset=UTF-8"/>
    It opens in Excel exactly as we'd want. The question is, how do I change this content type? Is there a server side configuration or is it something I can change via XSL?
    kind regards
    Duncan
    http://www.PeopleSoftTipster.com

    Hi Scott:
    I am facing this issue using XML Publisher in 11.5.10.2. I have been able to open rtf reports in PDF format but when choosing Excel, the output is opening in an html web browser.
    XML Publisher version is 5.6.3.
    I am using Oracle XML Publisher Template Builder for Word; version 5.6 Build 45.
    So, I have 2 questions at this point.
    1. I can try Duncans' "fix" and see if that corrects the issue (not really a question).
    2. Should I be upgrading to a version of BI Publisher template for word (10.13.2.1) ?
    Thanks and regards,
    Karen

  • Background jobs html output not allowed 1 MB size

    hi experts,
    We are facing an issue with backgrounds jobs HTML output. we are running some backgrounds jobs for Std reports, and we are facing if the HTML output is <1 MB, the std sap is cutting/reducing the content only 1 MB.  I think somewhere the background jobs HTML output is fixed 1MB, request kindly let us know how & where  we can modify/allow the HTML output <1 MB size for background jobs.
    Please help.
    thanks in advance
    Srihari

    thanx so much for the solution, but i wanted to fix permanently at the time of html output after the job is finished itself, but when i change the parameters from 1 to 9999 pages, it is showing information message and SAP recommends the spool output is fixed from 1 to 10 pages only, if i go beyond 10 pages, i get message memory slow and impact on memory, etc.,
    I wud like to know expert opinion whether doing from 1 to 100 pages thru SP01, what are consequences are to be faced wrt to memory and other aspects. Also i wanted to know these permanent changes will affect entire system or only specific jobs?
    I wanted for 2 to 5 background jobs, which are having more than 10 to 30 pages,
    Please advise
    thanx in advance
    srihari

  • Customizing Cp HTML output

    I'm looking for a little assistance regarding the best way to insert an HTML + Flash wrapper around the wrapper that is automatically generated by Cp4 in its HTML output. I'm a FL newbie/intermediate DW user, and I don't want to screw up the existing scripting in the HTML template files.
    So I guess my question really surrounds best practice for adding a header/footer/maybe rt-or-left nav frame around the content that CP produces. Would anyone who has done this be willing to share some code (stripped of your content, if you prefer) that might help me achieve this?
    Or, if I'm thinking about this in entirely the wrong way, can someone point me in the right direction? I feel like I'm being particularly dense about this!
    Thanks in advance!!
    A. Stringer

    Hello Brian and Marcel:
    I have the same question as you did. Did you get any further
    information about this? I am dying for a solution. If anybody
    has a solution, please share with us. Thanks.
    Brian Lin (guest) wrote:
    : Hi all,
    : Marcel, I got the same questions (problems) with you did. I
    have
    : been searching this topic for long time, still I can not have
    : right materials. Recently AMAZON (www.amazon.com) will have
    : Oracle JDeveloper 2.0 (ISBN: 0072120983) on the market, but
    I'm
    : not sure what's the contents inside talking about DBServlet.
    : Good luck!
    : Brian Lin
    : Marcel Sansaricq (guest) wrote:
    : : Hi everyone,
    : : I am a new user of JDeveloper 2.0. I have been trying to
    : : understand how JDeveloper's Wizard generated Database
    Servlets
    : : generate standard HTML pages for Querying, Updating,
    inserting
    : : database records. The InitializeDBServlet method that is
    : : generated by the DBServlet Wizard provides very little
    insight
    : : into the HTML generation engine.
    : : The JDeveloper documentation gives some hints on customizing
    : : Servlet HTML output in section "Creating a Custom HTML
    form".
    : : Basically, it recommends to use
    : : methods provided in oracle.jdeveloper.servlet.DBServlet,
    : : oracle.jdeveloper.servlet.UserSession,
    : : oracle.jbo.rt.cs.RowIterator and oracle.jbo.rt.cs.Row
    : interfaces
    : : to implement custom HTML forms that servlets can generate.
    : : The documentation files for oracle.jbo.rt.cs.* interfaces
    are
    : : missing within the JDeveloper help menu and coverage on
    : : oracle.jdeveloper.servlet.DBServlet,
    : : oracle.jdeveloper.servlet.UserSession is very basic.
    : : Can anyone point me in the right direction to get thorough
    : : documentation, containing examples if possible, on the
    : mentionned
    : : interfaces.
    : : Thanks in advance,
    : : Marcel Sansaricq
    null

  • Missing a single space in html output

    Hello to all,
    take a look at the following code copied from a View
    <% DATA: eins TYPE STRING VALUE 'ClassEins',
             zwei TYPE STRING VALUE 'ClassZwei'. %>
    <span id="Test1" class="<%=eins%> ClassZwei">test it</span>
    <span id="Test2" class="ClassEins <%=zwei%>">test it</span>
    it works fine if compression is set to NONE, but if compression is set to 1 (remove spaces) or 2 (remove spaces, CR, LF) the html output looks like this:
    <span id="Test1" class="ClassEinsClassZwei">test it</span>
    <span id="Test2" class="ClassEins ClassZwei">test it</span>
    Where is the single space? What’s wrong? Why is the first space removed, but the second isn’t?

    Thilo,
    At this stage we are not planning a kernel patch, unless your business case is really pressing. (In which case update OSS message so that rethink why nein is the right answer.) We have actually spend a number of hours to find where this is stripped (by accident), and see that the price to fix this, is very high for us. The truth is that this is a minor problem that only happens when you active the additional compression, where our first suggestion would be to just skip the compression for this page. (All of this been said, we will keep it on the toDo list, and see if can get the resources at same stage to dive into kernel development again.)
    (Just for interest, not even myself could remember where some of this code is executed. Your problem provided a nice trip down memory lane!)
    As for the back tics, they are string literals, and are space sensitive in ABAP. An example:
      CONCATENATE 'a ' 'b ' 'c ' INTO s. --> s = "abc".
      CONCATENATE `a ` `b ` `c ` INTO s. --> s = "a b c ".
    The nice thing about this is that it is now possible to write in ABAP strings that contain <b>both</b> HTML and JavaScript all in one:
      s = `<body onload="myFunc('JSparm');">`.
    We use " and ' for the HTML and JavaScript, and the ` to build the ABAP string. Makes the Java colleagues just jealous of our writing style:)
    brian

  • Help: No Parameters, HTML Output from Java Servlet

    I have a Java Servlet that reads parameters passed from an HTML form and displays them to another HTML page. I know the servlet is being invoked; however, I am not seeing any HTML output. Sending the output to a file reveals the parameters are coming in as NULL as well.
    I attempted a simple sample app with the same results. Here is what I am running:
    The HTML Form:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Collecting Three Parameters</TITLE>
    </HEAD>
    <BODY BGCOLOR="#FDF5E6">
    <H1 ALIGN="CENTER">Collecting Three Parameters</H1>
    <FORM ACTION="ThreeParams">
    First Parameter: <INPUT TYPE="TEXT" NAME="param1"><BR>
    Second Parameter: <INPUT TYPE="TEXT" NAME="param2"><BR>
    Third Parameter: <INPUT TYPE="TEXT" NAME="param3"><BR>
    <CENTER><INPUT TYPE="SUBMIT"></CENTER>
    </FORM>
    </BODY>
    </HTML>
    The Java Code:
    public class ThreeParams extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Reading Three Request Parameters";
    out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
         "Transitional//EN\">\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1 ALIGN=\"CENTER\">" + title + "</H1>\n" +
    "<UL>\n" +
    " <LI><B>param1</B>: "
    + request.getParameter("param1") + "\n" +
    " <LI><B>param2</B>: "
    + request.getParameter("param2") + "\n" +
    " <LI><B>param3</B>: "
    + request.getParameter("param3") + "\n" +
    "</UL>\n" +
    "</BODY></HTML>");
    What happens when I "submit" from the form is the same form reloads with the query string in the URL: "http://localhost:8080/ThreeParams/?param1=1&param2=2&param3=3"
    Any assistance with either (or both) would be thoroughly appreciated:
    a) why the parameters are not being passed correctly to the servlet
    b) why the HTML output page is not displayed
    Thanks in advance!
    - Steve

    I have found the answer to my problem listed in another thread.
    Thank you.

  • Reports 3/6i HTML Output Print problem

    Hi!
    I am using Reports 3 to generate HTML output but when I print this HTML output, it does not break at Oracle Reports Page break. It looks like the browser takes its default settings for margins. I am using IE 5.5.
    I tried the following options
    1. Using { page-break-after: always } option in 'After Page Value' of Report Escapes property (Report)
    2. Changing margin settings of browser, but was not able to change them to 0.
    I want to print the HTML report with page breaks where Oracle marks as Page Break.
    If possible, Please do write me at [email protected]
    Thanks,
    Praveen Kumar

    Praveen,
    When you generate a HTML page in Reports, you are generating a single page document that is then intepretted by the browser. You are correct that when you then print this page from the browser then it will not necessarily break at the same point as the reports page breaks.
    The only way to guarantee that you will get the same breaks is to use a different format. Most commonly people use PDF format when they want the printed page to match exactly what's on the screen. Alternatively you could include a link on the HTML rendition of the report that resubmits the report to the server but instructs the server to print the report directly.
    Hope this helps,
    Danny

  • HTML output and missing graph

    I am developing a report having a graph in BI Publisher 10.1.3.3.0. When the report o/p is genereated to PDF, the graph is showing up, but the same report doesnt return the chart in HTML output (it shows small icon in the place of graph). I followed Tim Dexter's blog http://blogs.oracle.com/xmlpublisher/2006/10/31 here. But, I didnt understand where i need to make the settings for 'Base image URI' and 'Image file directory' .
    In the Runtime configuration properties for this report, under HTML output, I see the foll.
    -show header
    -show footer
    -replace smart quotes
    -character set
    -make HTML output accessible
    -user percentage width for table columns.
    I even tried the o/p in excel and rtf but, the graph is missing in the o/p as well.
    Thanks in advance

    Can someone help me how to get the graph in HTML?

  • Tabs in HTML output

    We have a very large RoboHelp for Word project (24 source
    files, 2500 topics). Do to Vista issues we are converting from
    WinHelp to HTML output.
    In the Word source files, allignment (within lines) is
    controlled by left Tabs. The WinHlep output is fine. It appears the
    the tabs (as well as multiple spaces) are ignored in the
    HTMLoutput. A review of the HTML spurce code reveals that tabs are
    coverted to &nbsp on compilation.
    What are my options?

    > I do suppose there is always the option of continuing to
    author using RoboHelp for Word. After all, you may use this
    > to produce HTML Help and WebHelp outputs too. But if you
    are creating HTML outputs you may as well be using a
    > tool created to work with such files, no?
    With all due respect, Rick (and much is indeed due in the
    right contexts) this doesn't help the original poster. The tabs
    issue is as you point out a quirk of the HTML world, and the only
    benefit of moving to an HTML editor in that respect is to make it
    apparent up front that tabs can't be handled sensibly. As you say,
    get used to it - if you are using HTML-based output, you can't line
    things up with tabs. You can use tables, but that's a major editing
    operation with 2500 topics whatever tool you are using to write the
    help. I suppose the dignity of the problem depends on how important
    the lining up is in the final output.
    I may be reactionary, but I stick to Robohelp for Word even
    when I am generating Webhelp format. Sure, there are drawbacks, but
    IMHO Word offers a vastly superior authoring environment to
    one-topic-at-a-time HTML editors. The HTML editor might be a tool
    created to work with HTML files, but that doesn't automatically
    mean it's a good tool for the job.

  • Image not displayed in html output used webservice to store in a location

    hi
    we have used webservices to store the pdf and html outputs but the problem is when we are seeing the preview in the bi publisher we can see the image in pdf and html but when we run through webservices and see the output files that are stored in some location image in the html output is not displayed but in the pdf we can see the image.
    i have used the direct insertion image option in the header section. is the problem because i have used the direct insertion.
    can you give the idea how to import logo from an external location so that we can check the if it is problem with direct insertion or problem with the webservice as we are storing the output files outside the catlog but it may not be wrong because in pdf we can see the image.
    I am not having any idea how to solve thsi issue..
    Sorry to bother you with these many questions
    Thanks in Advance
    Have a Nice day.

    Please state which BI Publisher version you are using.
    In case it is 10g then please always test the application with the latest patch first!.
    BTW today there is been a new patch 11846804 released for 10.1.3.4.1 (March 2011).
    regards
    Jorge

Maybe you are looking for

  • F110 - AUTOMATIC PAYMENT TRANSACTION

    Hi people, I'm using F110 transaction to download  the Bordero file. Someone knows where I can fill the parameter for choose the fields that I need to send to txt file. After doing the download, I saw that the field ITEM was not filled, and I need th

  • Problems downloading photos from my camera (Panasonic Lumix). Some will download and others will not with error message that they are the wrong format (jPeg)

    Never had an issue before. Have installed latest software update and now only some of my photos will download. The rest will be recognized as a bad format (jPeg) and the camera will be ejected automatically, improperly, causing me to have to reboot t

  • BlackBerry Video Store

    I saw a post on blackberryos.com titled Introducing: BlackBerry Video Store for PlayBook http://www.blackberryos.com/blackberry-playbook/28635-introducing-blackberry-video-store-playbook.ht... The post has a link to register for the Blackberry Video

  • How big a Hard Drive can I put in?

    HELP!!! I've been wading through all kinds of info and cannot find a definitive (and simple) answer to my question. All I want to know is what is the LARGEST HD I can add to my G4? That is, without fooling around with cards, drivers, etc. An answer A

  • How to clear/send the failed notifications?

    Hi When i query and checked the wf_notifications table, is shows around 300 notifications that are with failed status. How to fix and send these notifications to the users? The query that i have used is as follows: select notification_id, status, mai