PowerShell pipe into find.exe command
PowerShell evaluates the content within double quotes to perform any variable expansion, sub-expressions, etc, then it discards those double quotes. What PowerShell returns from "443"
is literally 443
(note the missing quotes). FIND.EXE
requires the search string enclosed with double quotes.
If you want to prevent PowerShell from stripping the double quotes use the grave accent (`) to escape them.
netstat -a -n | find `"443`"
You may also use the --%
parameter to perform the escape. Requires PowerShell 3+.
nestat -a -n | find --% "443"