PowerShell Workflows

Associate
Joined
2 Jul 2003
Posts
2,442
Hi, has anyone had much experience with these things?!

Got one for pulling in list of computers from AD and then pings them all. Normally takes 10-15 mins for the sequential ping of 1700 machines to finish but with the parallel foreach loop I did it runs in 2!

Problem is when powershell is called from access (use it to put a shiny gui on the info PS digs up) via a cmd shell I get timeout errors that something has exceeded 30s and it bails. Really odd.
It's down to the number of items so I changed the script to run the parallel loop on a series of "chunks" of the total number of items so it's not doing quite so much (got to use the % operator for the first time to do the leftovers too!). Works but a couple minutes slower than when just run from PS directly. Can't set this "chunk" size to much higher than 300 or the timeout happens again.

Not a big deal but wondered if anyone might have any idea about this sort of behaviour. Tried playing with timeout variables but still comes back to this 30seconds limit.

Odd that when run from ISE or PS directly I don't have the issue.
 
Back
Top Bottom