Where did the source file come from? That appears a delimited file, what is the delimeter? If it is tab delimited maybe something like http://huddledmasses.org/powershell-convert-delimiters-import-tab-delimited-text/ so you can import the file into a variable and then export it back out.
------------------------------- "We're surrounded. That simplifies the problem!" CHESTY PULLER, USMChttp://about.me/jkavanagh58 From: christopher.catl...@us.sogeti.com To: powershell@lists.myitforum.com Subject: [powershell] RE: convert text to a csv Date: Wed, 18 Sep 2013 16:54:42 +0000 So If I pull the file into an object, piping that to export-csv will work? Christopher Catlett Consultant | Detroit Sogeti USA Office 248-876-9738 |Fax 877.406.9647 26957 Northwestern Highway, Suite 130, Southfield, MI 48033-8456 www.us.sogeti.com From: 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 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] On Behalf Of christopher.catl...@us.sogeti.com Sent: Wednesday, September 18, 2013 9:22 AM To: 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 Sogeti USA Office 248-876-9738 |Fax 877.406.9647 26957 Northwestern Highway, Suite 130, Southfield, MI 48033-8456 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
<<inline: image001.jpg>>