-o = one response per line (clean CSV-style output). Pipe to find to trigger alerts.
Here are the most useful to add to your troubleshooting arsenal. portqry examples
Output:
portqry -local -p <protocol> -port <port number> -o = one response per line (clean CSV-style output)