I think you would have to read one pass through the file to get the column 
headings, i.e. Name values.  Then you would have to close and reopen the file 
(to start at the beginning of the file) and read through again, this time 
looking only at the values.  I am assuming each system has the same number of 
entries for the file.



From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On 
Behalf Of CESAR.ABREG0 .
Sent: Wednesday, September 18, 2013 1:06 PM
To: powershell@lists.myitforum.com
Subject: Re: [powershell] RE: convert text to a csv

I don't think that would do the trick. how about open it with Excel and do text 
to column?

On Wed, Sep 18, 2013 at 9:54 AM, 
<christopher.catl...@us.sogeti.com<mailto:christopher.catl...@us.sogeti.com>> 
wrote:
So If I pull the file into an object, piping that to export-csv will work?

Christopher Catlett
Consultant | Detroit
[cid:image001.jpg@01CEB471.5E6785F0]

Sogeti USA
Office 248-876-9738<tel:248-876-9738> |Fax 877.406.9647<tel:877.406.9647>
26957 Northwestern Highway, Suite 130, Southfield, MI 48033-8456
www.us.sogeti.com<http://www.us.sogeti.com/>

From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> 
[mailto:listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com>] 
On Behalf Of Lutz, Ken
Sent: Wednesday, September 18, 2013 12:43 PM
To: powershell@lists.myitforum.com<mailto:powershell@lists.myitforum.com>
Subject: [powershell] RE: convert text to a csv

Christopher,

Are you looking for the cmdlet Export-CSV?

http://technet.microsoft.com/en-us/library/ee176825.aspx

Thanks,
Ken ...

From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> 
[mailto:listsad...@lists.myitforum.com] On Behalf Of 
christopher.catl...@us.sogeti.com<mailto:christopher.catl...@us.sogeti.com>
Sent: Wednesday, September 18, 2013 9:22 AM
To: powershell@lists.myitforum.com<mailto:powershell@lists.myitforum.com>
Subject: [powershell] convert text to a csv

I have a file with many entries like the below, trying to convert them into a 
csv, my googling is failing me today.


Name                           Value
----                           -----
Model                          25184HU
Cores                          4
RAM                            2
Vendor                         LENOVO
Manufacturer                   LENOVO
Sockets                        1
CSModelType                    ThinkPad T410
IdentifyingNumber              R88TGZ7
Hostname
SystemType                     X86-based PC

Christopher Catlett
Consultant | Detroit
[cid:image001.jpg@01CEB471.5E6785F0]

Sogeti USA
Office 248-876-9738<tel:248-876-9738> |Fax 877.406.9647<tel:877.406.9647>
26957 Northwestern Highway, Suite 130, Southfield, MI 48033-8456
www.us.sogeti.com<http://www.us.sogeti.com/>


================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1

================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1

================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1


================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1


================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1

<<inline: image001.jpg>>

Reply via email to