[英]Creating private queues in PowerShell on Windows Server 2008 R2
[英]PowerShell command to check the connection between IPaddress and port in Windows Server 2008 R2
我正在使用Windows Server 2012 R2上的PowerShell脚本。 我正在检查带有端口的机器的测试连接。 以下PowerShell命令正在运行:
Test-NetConnection localhost -Port 445
根据结果,此命令与-InformationLevel
一起返回TRUE
或FALSE
。 这正是我想要的。
我需要在Windows Server 2008 R2上运行相同的检查。 我知道Test-NetConnection
命令在Server 2008上不起作用。找不到其他命令来检查machineIP和port之间的连接并返回TRUE
或FALSE
。 谁能为此建议一个替代的PowerShell命令吗?
这是Boe Prox的TechNet脚本中心的脚本。
那里有许多使用Connect
或BeginConnect
方法的System.Net.Sockets.TcpClient
和System.Net.Sockets.UdpClient
.Net类的 变体 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.