我不知道发生了什么,但每次我输入以下命令:
Test-Connection -ComputerName TARGET -TimeToLive 6
我收到以下错误:
Test-Connection : Testing connection to computer 'TARGET' failed: Problem with some part of the filterspec or providerspecific buffer in general
At line:1 char:16
+ Test-Connection <<<< -ComputerName TARGET -TimeToLive 6
+ CategoryInfo : ResourceUnavailable: (TARGET:String) [Test-Connection], PingException
+ FullyQualifiedErrorId : TestConnectionException,Microsoft.PowerShell.Commands.TestConnectionCommand
有趣的是,如果我没有-TimeToLive
参数,例如:
Test-Connection -ComputerName TARGET
Test-Connection -ComputerName TARGET -Count 2
命令按预期工作!并且Get-Help Test-Connection
诱人地表明这-TimeToLive
确实是一个有效的参数。
我哪里做错了?