Answered by:
Change remote PS time out.

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 $SessionAfter 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:00How 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
Answers
-
Hi,
Do you mean Change the Intellisense Timeout Value in PowerShell?
It works for PS 3.0
How to Set a Timeout in PowerShell
http://www.ehow.com/how_12026004_set-timeout-powershell.html
Regards,
Yan Li
Yan Li
TechNet Community Support
Tuesday, November 13, 2012 6:15 AM
All replies
-
I have seen that happen, and when I issue an Exchange cmdlet, a new session is automatically created.
I'd not worry about it.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
My Blog: http://unlockpowershell.wordpress.com
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})Friday, November 9, 2012 9:17 PM -
Hi,
Do you mean Change the Intellisense Timeout Value in PowerShell?
It works for PS 3.0
How to Set a Timeout in PowerShell
http://www.ehow.com/how_12026004_set-timeout-powershell.html
Regards,
Yan Li
Yan Li
TechNet Community Support
Tuesday, November 13, 2012 6:15 AM