none
Powershell - Invoke-Command Network Connection has been interrupted RRS feed

  • Question

  • Hi,

    I have been having this problem intermittently, i use

    invoke-command -AsJob -computername myserver1 -scriptblock {get-process}

    WARNING: The network connection to myserver1 has been interrupted. Attempting to reconnect for up to 4 minutes...

    WARNING: Attempting to reconnect to myserver1 ...

    WARNING: The network connection to myserver1 has been restored.

    On another window i did a ping myserver1 -t to see if any network packets are lost but anything of that sort happened.

    I tried using the IP of myserver1 as well and see the same.

    Any idea why this message comes up and under what circumstances?

    Thanks for your thoughts and help.

    Tuesday, February 25, 2014 5:50 AM

Answers

  • Hi Past,

    this sounds like a temporary lack of access to the necessary remote resources. Direct network connectivity is of course mandatory, but there are more dependencies. Pinging will still work when the WinRM service hangs, local Powershell Execution on the target is on hold, massive lack of available resources, etc..

    I do not know of any specifically typical reasons for this to occur, so the only recommendation I can give you is to do some more in depth monitoring on the target device while recreating the issue.

    Cheers,
    Fred


    There's no place like 127.0.0.1

    Tuesday, February 25, 2014 12:36 PM

All replies

  • Hi Past,

    this sounds like a temporary lack of access to the necessary remote resources. Direct network connectivity is of course mandatory, but there are more dependencies. Pinging will still work when the WinRM service hangs, local Powershell Execution on the target is on hold, massive lack of available resources, etc..

    I do not know of any specifically typical reasons for this to occur, so the only recommendation I can give you is to do some more in depth monitoring on the target device while recreating the issue.

    Cheers,
    Fred


    There's no place like 127.0.0.1

    Tuesday, February 25, 2014 12:36 PM
  • Check the event log on the target machine.

    A bad IF adapter or a bad router can  cause this. 

    When pining be sure to use large packets.

    ping targethosst -l 4000


    ¯\_(ツ)_/¯


    • Edited by jrv Tuesday, February 25, 2014 1:50 PM
    Tuesday, February 25, 2014 1:48 PM
  • thanks Fred
    Thursday, February 27, 2014 9:10 PM
  • thanks jrv
    Thursday, February 27, 2014 9:11 PM