Powershell – Export-Csv to export multi-valued attributes

Passing Mutliple Variables to Export-CSV cmdlet

If you have overcome a situation where-in; while exporting results using Export-CSV; multi-valued columns return just the property System.String[]; I have just the right solution for you

If the multi-valued column name is recipients; use the column as below

@{Name=’recipients’;Expression={[string]::join(“;”, ($_.recipients))}}

 

Advertisements

About Sunil Padmanabhan

An Indian based out of Dubai who started traveling from 2011 and pretty much caught the travel bug. Every year presents itself as an opportunity to visit and explore a new place.

Posted on November 12, 2014, in Powershell and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: