<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Learn How to Manually Create a CSV File in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/03/24/learn-how-to-manually-create-a-csv-file-in-powershell.aspx</link><description>The Scripting Wife learns how to manually create a CSV file in this beginner Windows PowerShell blog.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Learn How to Manually Create a CSV File in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/03/24/learn-how-to-manually-create-a-csv-file-in-powershell.aspx#3532998</link><pubDate>Fri, 16 Nov 2012 19:27:23 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3532998</guid><dc:creator>JKevinParker</dc:creator><description>&lt;p&gt;jrv, that bit of script was very helpful! However, to get it to work right, I had to modify the last line:&lt;/p&gt;
&lt;p&gt;$csv=@()&lt;/p&gt;
&lt;p&gt;$csv+=New-Object PSObject -Property @{Index=1;Name=&amp;#39;John&amp;#39;}&lt;/p&gt;
&lt;p&gt;$csv+=New-Object PSObject -Property @{Index=2;Name=&amp;#39;Mary&amp;#39;}&lt;/p&gt;
&lt;p&gt;$csv+=New-Object PSObject -Property @{Index=3;Name=&amp;#39;Kate&amp;#39;}&lt;/p&gt;
&lt;p&gt;$csv | Export-CSV C:\temp\mycsv.csv -notype&lt;/p&gt;
&lt;p&gt;That change to &amp;quot;Export-CSV&amp;quot; made the values and headings display in columns in Excel as expected, whereas using &amp;quot;ConvertTo-Csv&amp;quot; crammed the strings into one column.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3532998" width="1" height="1"&gt;</description></item><item><title>re: Learn How to Manually Create a CSV File in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/03/24/learn-how-to-manually-create-a-csv-file-in-powershell.aspx#3488436</link><pubDate>Sat, 24 Mar 2012 22:12:23 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3488436</guid><dc:creator>K_Schulte</dc:creator><description>&lt;p&gt;Hi Ed, Hi Teresa&lt;/p&gt;
&lt;p&gt;using CSV files is always a good idea in Powershell environments.&lt;/p&gt;
&lt;p&gt;They are automatically converted to objects by Import-Csv and can easily be created.&lt;/p&gt;
&lt;p&gt;Of course @jrv is right ... we could use other datastructures to produce CSVs.&lt;/p&gt;
&lt;p&gt;Many roads lead to rome ...&lt;/p&gt;
&lt;p&gt;btw: If you need help with your new book, ... let me know!&lt;/p&gt;
&lt;p&gt;I installed WIN8 in a virtual machine just to have PS3 available :-)&lt;/p&gt;
&lt;p&gt;So ... let the future begin! ( and the games in 9 days :-)&lt;/p&gt;
&lt;p&gt;Klaus&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3488436" width="1" height="1"&gt;</description></item><item><title>re: Learn How to Manually Create a CSV File in PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/03/24/learn-how-to-manually-create-a-csv-file-in-powershell.aspx#3488402</link><pubDate>Sat, 24 Mar 2012 11:15:22 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3488402</guid><dc:creator>jrv</dc:creator><description>&lt;p&gt;$csv=@()&lt;/p&gt;
&lt;p&gt;$csv+=New-Object PSObject -Property @{Index=1;Name=&amp;#39;John&amp;#39;}&lt;/p&gt;
&lt;p&gt;$csv+=New-Object PSObject -Property @{Index=2;Name=&amp;#39;Mary&amp;#39;}&lt;/p&gt;
&lt;p&gt;$csv+=New-Object PSObject -Property @{Index=3;Name=&amp;#39;Kate&amp;#39;}&lt;/p&gt;
&lt;p&gt;$csv|ConvertTo-Csv -notype &amp;gt; c:\fso\mycsv.csv&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3488402" width="1" height="1"&gt;</description></item></channel></rss>