I am trying to run the netstat command in a Powershell script and getting conflicting results.
If I run the following netstat command at the Powershell window, it returns the information just fine:
PS C:\tmp> $c = netstat -ban | select-string "F5FltSrv"; $c.count
But if I run a similar operator in the script, it keeps returning '0' (zero), so it fails. Attached powershell script for reference.