TechTalkz.com Logo Ask the Expert

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Microsoft Windows Powershell

Notices

winrs timeout error with powershell

Microsoft Windows Powershell


Reply
 
Thread Tools Display Modes
Old 18-06-2008, 04:53 AM   #1
Frank
Guest
 
Posts: n/a
winrs timeout error with powershell

Hi,

I am executing a Powershell script via winrs which takes over an hour to
complete. It would time out but I don't know which setting to change to
permit long runs. Does anyone know?

Here is the error:

Winrs error:The WinRM client cannot complete the operation within the time
specified. Check if the machine name is valid and is reachable over the
network and firewall exception for Windows Remote Management service is
enabled.

When I try a small script, it works.

This is how I execute the script:

winrs /r:testserver powershell.exe -nologo -noprofile d:\test.ps1

I have changed the idle timeout from 900000 to 7200000. I think think this
is ms.

winrm get winrm/config

Winrs
AllowRemoteShellAccess = true
IdleTimeout = 7200000
MaxConcurrentUsers = 5
MaxShellRunTime = 2147483647
MaxProcessesPerShell = 5
MaxMemoryPerShellMB = 200
MaxShellsPerUser = 2

Thanks in advance,


  Reply With Quote
Old 18-06-2008, 05:52 PM   #2
Marco Shaw [MVP]
Guest
 
Posts: n/a
Re: winrs timeout error with powershell

Frank wrote:
> Hi,
>
> I am executing a Powershell script via winrs which takes over an hour to
> complete. It would time out but I don't know which setting to change to
> permit long runs. Does anyone know?


Looks like you've found the correct winrm/winrs timeout setting.

Server 2008? Perhaps there's something else at play here. Are there
any firewalls? Whether network or client (on the server itself)?

Do you know how to take a packet capture? Might not help especially if
the trace shows a TCP RESET packet come back to kill the connection, yet
it won't indicate exactly why the RESET came back. Might only help to
determine if there's a regular time lapse before the RESET comes.

Marco


--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
  Reply With Quote
Reply

Thread Tools
Display Modes



< Home - Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 03:27 PM.


vBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2010, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional