我不知道發生了什麼,但每次我輸入以下命令:PowerShell測試連接-TimeToLive錯誤?
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
是確實是一個有效的參數。
我哪裏錯了?
使用-TimeToLive參數適合我。你可以在另一臺電腦上查看嗎? – ravikanth
@ravikanth它確實在其他計算機上工作。 IIRC,它*使用*正常工作,但現在不再工作。可能是什麼原因,我想知道...... – pepoluan
在測試localhost時是否會出現相同的錯誤? – SpellingD