Hi Andy,
you can't use the output of the foreach statement in the pipeline because it is a statement and not a cmdlet. You can use the PowerShell & operator to invoke the foreach command as a scriptblock and pipe the output of the scriptblock to the Export-CSV cmdlet. In short:
& { foreach ...} | Export-CSV -Path SpeedInfo.csv -NoTypeInformation -UseCulture