This topic contains 2 replies, has 2 voices, and was last updated by
June 27, 2016 at 10:58 am #44920ParticipantTopics: 25Replies: 42Points: 28Rank: Member
I have a number of server scan results in a custom object properties like some file paths, local groups. Problem is when I try to export to csv some note properties e.g. file paths get cut and my local groups get only first line in the csv. As an example I have a Custom Object called $report with note properties scheduled_task_action C:\Program Files\ABC\test.exe C:\Program Files\ABC\test.xml where after exporting to csv I see only C:\Program Files\A
or in my local_admins list property :
I only get administrator. All the note properties are strings. I export with
$report | select scheduled_task_action, local_admins | Export-CSV .\test.csv -force -encoding UTF8 -NoTypeInformation
How can this be fixed so the whole properties show up when I open the csv in Execl?
June 27, 2016 at 11:19 am #44924MemberTopics: 9Replies: 2322Points: 0Rank: Member
Depends on what's in the objects you're exporting to a CSV. Also, in Excel, you may need to change your column height / row width in order to see all of the information that's available in each cell.
June 27, 2016 at 11:34 am #44926ParticipantTopics: 25Replies: 42Points: 28Rank: Member
You're right. I incorrectly assumed that export-csv will add comas where needed yet looking at the resulting csv in notepad it seems it's not the case so need to sort out my formatting.
I noticed that for some reason in the resulting csv I get end of line followed by "," in the line below which messes up the csv
what coule be the reason for that?
The topic ‘PsCustomObject into CSV’ is closed to new replies.