Hi there,
You can use the Export-Csv cmdlet to convert objects to CSV strings. Export-CSV is similar to ConvertTo-CSV , except that it saves the CSV strings to a file. The ConvertTo-CSV cmdlet has parameters to specify a delimiter other than a comma or use the current culture as the delimiter.
A tab-separated text file could be treated as a CSV file with a tab instead of a comma as its delimiter. To convert:
import-csv tabdelimitedfile.txt -delimiter "`t" | export-csv csvfile.csv
This might help you in digging out more info https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/convertto-csv?view=powershell-7.2
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept it as an answer--