Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在powershell中识别端口是否关闭或过滤?此处显示的脚本仅检查是否可以成功进行连接。它无法区分封闭和过滤。
不确定这是否会显示端口是否被过滤或关闭,但至少这会提供更多信息:
clear $port = 139 $portStats = &netstat -an | Select-String ":$port" $portStats