[英]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.