I've created the following query to be used in a Powershell script. The query works correctly as long as I don't Select the TimeStamp variable. Any suggestions/ideas/solutions would be greatly appreciated.
SELECT TOP 3 f.TimeStamp, f.SourceIP, f.DestinationIP, SUM(f.Bytes) as TotalBytes FROM Orion.Netflow.FlowsByConversation f
WHERE f.TimeStamp >= '2014-06-12 13:00:00' AND f.TimeStamp <= '2014-06-12 13:59:59'
AND InterfaceIDTx = 12060
GROUP BY f.SourceIP, f.DestinationIP
ORDER BY SUM(f.Bytes) DESC
When I add the TimeStamp to the select statement I get the following error:
Get-SwisData : The communication object, System.ServiceModel.Security.SecurityS
essionClientSettings`1+ClientSecurityDuplexSessionChannel[System.ServiceModel.C
hannels.IDuplexSessionChannel], cannot be used for communication because it is
in the Faulted state.
At C:\swis\sample_paul.ps1:73 char:15
+ Get-SwisData <<<< $swis $query | Out-File C:\SWIS\Sample_Paul_Output.txt
+ CategoryInfo : NotSpecified: (:) [Get-SwisData], CommunicationO
bjectFaultedException
+ FullyQualifiedErrorId : System.ServiceModel.CommunicationObjectFaultedEx
ception,SwisPowerShell.GetSwisData