I'm extracting fields from Active Directory and piping that into a .csv file, My Select-Object command returns the fields by name. My problem is some of these fields contain carriage return and line feed information I want to remove before piping it into the .csv
Example:
Select-Object SamAccountName,displayName,info | ConvertTo-CSV -NoTypeInformation |
Out-File -Append -FilePath $Filepath -Encoding unicode
How can I intercept and amend the 'info' field before firing it to .csv?
Thanks.