Using VBScript I need to capture output from a Windows command that has been parsed with Find.
The direct input to windows would be: netstat -na | Find "22"
Below is what I've tried to no avail.
What is the correct syntax?
strCmd = "netstat -na | Find " & Chr(34) & "22" & Chr(34)
Set objShell = CreateObject("WScript.Shell")
Set objScriptExec = objShell.Exec(strCmd)
strOutput = objScriptExec.StdOut.ReadAll