How it works...
Importing content from a CSV is a straightforward process. The columns in a CSV are separated by commas. PowerShell creates an object from the input content, with each column making a property of a PowerShell custom object. Operations that we perform on objects can be performed on the PSCustomObject, however, the only limitation with Import-Csv is that the properties cannot be multi-valued, nor can they have other sub-properties within them. There could be ways to achieve multi-valued properties with CSV, but they would involve some manipulation after the object is imported within PowerShell. One such way is to separate the values of the property with a delimiter, and then, after the import, split the delimited value.
On the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access