Windows Vista Forums

Export-Clixml output is inconvenient for viewing

  1. #1


    =?Utf-8?B?Um9tYW4gS3V6bWlu?= Guest

    Export-Clixml output is inconvenient for viewing

    Export-Clixml writes all the data as the only line of text (well, except line
    breaks in the data). It is inconvenient for viewing of the output content. At
    the same time I expect lots of occasions when it could be useful to view or
    even modify output Clixml files using, say, a text editor.

    Perhaps I miss something and “no-line-breaks” is vitally important for
    Clixml format. If it is not then my suggestion is to add parameter(s) for
    Export-Clixml formatting customization (at least line breaks at XML element
    ends). And, as for me, I would prefer line breaks enabled by default.

    --
    Thanks,
    Roman

    ----------------
    This post is a suggestion for Microsoft, and Microsoft responds to the
    suggestions with the most votes. To vote for this suggestion, click the "I
    Agree" button in the message pane. If you do not see the button, follow this
    link to open the suggestion in the Microsoft Web-based Newsreader and then
    click "I Agree" in the message pane.

    http://www.microsoft.com/communities...ows.powershell

      My System SpecsSystem Spec

  2. #2


    Jeffrey Snover [MSFT] Guest

    Re: Export-Clixml output is inconvenient for viewing

    We developed this with import and export in mind and not viewing. You
    should file this as a feature request.

    --
    Jeffrey Snover [MSFT]
    Windows PowerShell/Aspen Architect
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, no confers rights.
    Visit the Windows PowerShell Team blog at:
    http://blogs.msdn.com/PowerShell
    Visit the Windows PowerShell ScriptCenter at:
    http://www.microsoft.com/technet/scr.../hubs/msh.mspx



      My System SpecsSystem Spec

  3. #3


    Karl Prosser Guest

    Re: Export-Clixml output is inconvenient for viewing

    i think that a format-XML cmdlet would be a good addition rather than
    changing this..

    if you want this string to be visible and readible in a nice manner you can
    do a few things.. load it back in type cast it as [xml] which puts it into
    an XmlDocument which has some methods to get the text or save if it a format
    which is better for humans to read
    another way if you are just wanting to view it interactively, is to use my
    powershell analyzer.. anything that is XML will show up on the XML tab in a
    colored, formated, and interactivce way (you can expand and contract
    nodes).. www.karlprosser.com/coder for more details.



      My System SpecsSystem Spec

  4. #4


    Lee Holmes [MSFT] Guest

    Re: Export-Clixml output is inconvenient for viewing

    Scott Hanselman and Keith Hill also had good "XML Pretty Print" scripts:

    http://keithhill.spaces.live.com/blog/cns!5A8D2641E0963A97!618.entry
    http://keithhill.spaces.live.com/blog/cns!5A8D2641E0963A97!620.entry
    http://www.hanselman.com/blog/AnXmlT...owerShell.aspx

    --
    Lee Holmes [MSFT]
    Windows PowerShell Development
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, and confers no rights.


    "Karl Prosser" <monadzWITHOUTTHIS@gmail.com> wrote in message
    news:e4mFKGAzGHA.1256@TK2MSFTNGP04.phx.gbl...
    >i think that a format-XML cmdlet would be a good addition rather than
    >changing this..
    >
    > if you want this string to be visible and readible in a nice manner you
    > can do a few things.. load it back in type cast it as [xml] which puts it
    > into an XmlDocument which has some methods to get the text or save if it a
    > format which is better for humans to read
    > another way if you are just wanting to view it interactively, is to use my
    > powershell analyzer.. anything that is XML will show up on the XML tab in
    > a colored, formated, and interactivce way (you can expand and contract
    > nodes).. www.karlprosser.com/coder for more details.
    >




      My System SpecsSystem Spec


Export-Clixml output is inconvenient for viewing
Similar Threads
Thread Forum
Export-clixml producing weird xml output PowerShell
Formatting Inline for Export-CliXML Command PowerShell
Export/Import-CliXml oddity PowerShell
export-clixml and compare-object question PowerShell
Export-CliXml/Export-Csv: Change to Export-Object? PowerShell