Change remote PS time out. RRS feed

  • Question

  • Hi everyone,

    I have an E2K10 environment and I use powershell from my Win7 desktop to remotely connect to the EMC.  I create the session with commands:

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://servera/PowerShell/ -Authentication Kerberos
    Import-PSSession $Session

    After about 5 minute, I enter this command $session on my desktop and it shows session state is broken.

    Id Name            ComputerName    State    ConfigurationName     Availability
    -- ----            ------------    -----    -----------------     ------------
      1 Session1       servera.... Broken   Microsoft.Exchange            None

    $pssessionoption gives:

    PS C:\Windows\system32> $pssessionoption

    MaximumConnectionRedirectionCount : 5
    NoCompression                     : False
    NoMachineProfile                  : False
    ProxyAccessType                   : None
    ProxyAuthentication               : Negotiate
    ProxyCredential                   :
    SkipCACheck                       : False
    SkipCNCheck                       : False
    SkipRevocationCheck               : False
    OperationTimeout                  : 00:03:00
    NoEncryption                      : False
    UseUTF16                          : False
    Culture                           :
    UICulture                         :
    MaximumReceivedDataSizePerCommand :
    MaximumReceivedObjectSize         :
    ApplicationArguments              :
    OpenTimeout                       : 00:03:00
    CancelTimeout                     : 00:01:00
    IdleTimeout                       : 00:04:00

    How do I keep this session open permanately as I have many scripts that I run each day.  I assume I need to change IdleTimeout paramenter but I don't know how.  I issued commandNew-PSSessionOption -IdleTimeout but it does not stick. Thanks in advance.

    Friday, November 9, 2012 2:39 PM


All replies