<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic output to file only in one line in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/output-to-file-only-in-one-line/m-p/23421#M1093</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scott,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for pointing out. I managed to resolve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;$lines = gc "path to the file"&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;$lines | out-file "path to the file" -Encoding unicode&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Mar 2014 15:30:45 GMT</pubDate>
    <dc:creator>ROELSANJOSE</dc:creator>
    <dc:date>2014-03-15T15:30:45Z</dc:date>
    <item>
      <title>output to file only in one line</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/output-to-file-only-in-one-line/m-p/23408#M1091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate if you can help on the scenario below. In powershell window the output is formatted (line by line) but when I send it to a text file, it's only one line. How to keep it the same?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Command Output&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PS C:\&amp;gt; &lt;STRONG&gt;Read-NaFile /vol/vol0/etc/rc&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;#Auto-generated by setup Wed Apr 25 10:11:51 GMT 2012&lt;/P&gt;&lt;P&gt;hostname FILER1&lt;/P&gt;&lt;P&gt;ifgrp create multi vif1 -b ip e0a e0b&lt;/P&gt;&lt;P&gt;ifconfig vif1 `hostname`-vif1 mediatype auto netmask 255.255.255.0&lt;/P&gt;&lt;P&gt;route add default 10.50.4.1 1&lt;/P&gt;&lt;P&gt;routed on&lt;/P&gt;&lt;P&gt;options dns.enable off&lt;/P&gt;&lt;P&gt;options nis.enable off&lt;/P&gt;&lt;P&gt;savecore&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS C:\&amp;gt; Read-NaFile /vol/vol0/etc/rc &amp;gt;c:\test.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Notepad Output (one line)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://community.netapp.com/legacyfs/online/25192_pastedImage_0.png" style="width: 1200px; height: 305px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:40:51 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/output-to-file-only-in-one-line/m-p/23408#M1091</guid>
      <dc:creator>ROELSANJOSE</dc:creator>
      <dc:date>2025-06-05T05:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: output to file only in one line</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/output-to-file-only-in-one-line/m-p/23413#M1092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is an issue with Notepad and how it treats carriage feed / line return.&amp;nbsp; This particular issue is why you shouldn't use Notepad to edit config files, Notepad does not respect the conventions of the source format and changes the output.&amp;nbsp; If you edit /etc/exports with Notepad, then save, go to a Unix system and run cat -v /etc/exports you will see the "^M" character all through the file, you should see "$". I have seen this break config files many times.&amp;nbsp; Unfortunately this is common with a lot of Microsoft products.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use something like Wordpad(on Windows 7 at least), Notepad++, Textpad, Crimson Editor, etc they will show you the ouput in the correct format without issue.&amp;nbsp; You would have to build a wrapper script to change the Unix CR/LF to the Windows ^M to get Notepad to show the output correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 14:54:02 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/output-to-file-only-in-one-line/m-p/23413#M1092</guid>
      <dc:creator>cscott</dc:creator>
      <dc:date>2014-03-14T14:54:02Z</dc:date>
    </item>
    <item>
      <title>output to file only in one line</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/output-to-file-only-in-one-line/m-p/23421#M1093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scott,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for pointing out. I managed to resolve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;$lines = gc "path to the file"&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;$lines | out-file "path to the file" -Encoding unicode&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 15:30:45 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/output-to-file-only-in-one-line/m-p/23421#M1093</guid>
      <dc:creator>ROELSANJOSE</dc:creator>
      <dc:date>2014-03-15T15:30:45Z</dc:date>
    </item>
  </channel>
</rss>

