I have the script below that works just fine, but i need to use the pipe separator as a column separator, help :
$enddate = (Get-Date).tostring("yyyyMMdd")
$AttachmentPath6 = 'D:\PerfTeam_Queries\' + $enddate + '_Interfaces.csv'
$QueryFmt6= "SELECT NodeID,InterfaceID,InterfaceName,InterfaceType,InterfaceTypeDescription,InterfaceSpeed,InterfaceMTU,InBandwidth,OutBandwidth,FullName FROM Interfaces; "
Invoke-Sqlcmd -ServerInstance localhost -Database NetPerfMon -Query $QueryFmt6 | Export-CSV $AttachmentPath6
