【问题标题】:PowerShell cmdlet Test-NetConnection not availablePowerShell cmdlet Test-NetConnection 不可用
【发布时间】:2018-05-14 05:30:24
【问题描述】:
我注意到 cmdlet Test-NetConnection 未安装在 Server 2012 上。由于 Server 2012 附带 PowerShell 版本 3,所以我认为更新到最新版本 5.1 可能会有所帮助。
我进行了更新,但 cmdlet Test-NetConnection 仍然不可用。
只有Test-Connection 存在,但我需要Test-NetConnection 来测试端口。
我现在如何获得Test-NetConnection?
PS C:\Windows\system32> $PSVersionTable
名称 值
---- -----
PS版本 5.1.14409.1005
PSEdition 桌面版
PSCompatibleVersions {1.0、2.0、3.0、4.0...}
构建版本 10.0.14409.1005
CLRVersion 4.0.30319.34209
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
序列化版本 1.1.0.1
PS C:\Windows\system32> Get-Command Test-NetConnection
Get-Command :术语“Test-NetConnection”未被识别为 cmdlet 的名称,
函数、脚本文件或可运行的程序。检查名称的拼写,或者如果路径
已包含,请验证路径是否正确,然后重试。
在行:1 字符:1
+ Get-Command Test-NetConnection
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Test-NetConnection:String) [Get-Command], CommandNotFoundException
+ FullyQualifiedErrorId:CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand
【问题讨论】:
标签:
powershell
windows-server-2012