Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更改远程PowerShell重新连接超时_Powershell_Powershell Remoting_Winrm - Fatal编程技术网

更改远程PowerShell重新连接超时

更改远程PowerShell重新连接超时,powershell,powershell-remoting,winrm,Powershell,Powershell Remoting,Winrm,当远程PowerShell会话打开且TCP停止工作时(例如,电源关闭/电缆断开/…),Invoke命令或Remove PSSession命令会在尝试重新连接时阻塞几分钟 我想把这个超时时间减少到5秒 在Invoke命令中,我得到了警告 WARNING: The network connection to 192.168.30.106 has been interrupted. Attempting to reconnect for up to 4 minutes... WARNING: Atte

当远程PowerShell会话打开且TCP停止工作时(例如,电源关闭/电缆断开/…),Invoke命令或Remove PSSession命令会在尝试重新连接时阻塞几分钟

我想把这个超时时间减少到5秒

在Invoke命令中,我得到了警告

WARNING: The network connection to 192.168.30.106 has been interrupted. Attempting to reconnect for up to 4 minutes...
WARNING: Attempting to reconnect to 192.168.30.106 ...
WARNING: Attempting to reconnect to 192.168.30.106 ...
WARNING: Attempting to reconnect to 192.168.30.106 ...
WARNING: Attempting to reconnect to 192.168.30.106 ...
WARNING: Attempting to reconnect to 192.168.30.106 ...
WARNING: Attempting to reconnect to 192.168.30.106 ...
WARNING: Attempting to reconnect to 192.168.30.106 ...
WARNING: The reconnection attempt to 192.168.30.106 failed. Attempting to disconnect the session...
WARNING: Computer 192.168.30.106 has been successfully disconnected.
Invoke-Command : Network connectivity to 192.168.30.106 has been lost and the reconnection attempt failed. Please repair the network connection and reconnect using Connect-PSSession or 
Receive-PSSession.
At line:4 char:1
+ Invoke-Command -Session $remoteSession -ScriptBlock {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationTimeout: ([PSSession]Session7:PSSession) [Invoke-Command], RuntimeException
    + FullyQualifiedErrorId : PowerShellNetworkFailedStartDisconnect,Microsoft.PowerShell.Commands.InvokeCommandCommand
Remove PSSession似乎使用了不同的超时(大约100秒)

OpenTimeout、OperationTimeout、IdleTimeout和CancelTimeout似乎都不会影响这些超时

我想我需要一些较低级别的超时选项。那在什么地方存在吗