I was just trying to do something in PowerShell and got an error stating that the call depth was set to 1000 in some test recursive function. I looked at the information on the Internet and found that this was due to error handling in PowerShell (if I understood correctly):
The recursion depth limit is fixed in version 1. Deep recursion caused problems in 64-bit mode because exceptions were handled. This caused cascading errors out of memory. As a result, we have limited the recursion depth on all platforms to ensure that scripts are portable across all platforms. - Bruce Payet, PowerShell Co-Designer
I found here .
I also found this exception page on MSDN, which states that this limit is configurable (but I haven't found anything about how to do this) - see the comments section here .
How to set this limit?
exception powershell recursion
jumbo
source share