3 Replies Latest reply on Apr 26, 2012 10:11 AM by -==cfSearching==-

    cfexecute powershell timeout

    Byron.Marsh Level 1

      First let me say that I am a novice when it comes to Powershell and cfcexecute, though I've been using CF on and off since version 4.


      I have a PowerShell/Migration shell console file script that updates email passwords on our MSOnline instance.  It works fine if I run it from the run or command line in Windows, but from cfexecute in Coldfusion 9.0.1 it times out.  If I set the timeout to 0 the timeout is ignored, but I'll have no idea if it ran.  The odd thing is that the code actually does its job, but it leaves both the cmd.exe and powershell.exe processes running and I never get a return code regardless of how long I set the timeout.  I have tried all of the /c, 2>$1, exit code, etc., I could find, but none of them seem to work.


      I have also tried running the console script from a bat file and directly running Powershell command, but I get the same result when using cfexecute.  Besides being over 87MB per instance Powershell, I really don't want to leave a bunch of orphaned processes running.


      I'm sure there are better ways of doing this.  Any thoughts would be appreciated.