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 other hand, a CLIXML (or a Common Language Infrastructure XML) is a complete .NET object. When a PowerShell object is exported to CLIXML, the object is retained as it is. That is, the CLIXML retains all the properties (of theoretically any depth), and the methods that were part of the output object. In other words, it can be said that a CLIXML export is almost lossless in terms of the members of the object.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.184.90