Parallel Powershell for Running SQL - sheldonhull.com #161
Replies: 2 comments
-
Well. It seems that Invoke-Parallel is not supported anymore.
The same error using https://github.com/powercode/PSParallel example:
|
Beta Was this translation helpful? Give feedback.
-
@taksis I'm really sorry I missed this comment. So my first tip would be don't use Invoke-Parallel anymore. Try looking at this microblog post and see that example. I really don't think using Invoke-Parallel or Start-RSJob is needed anymore with PowerShell 7 and the native support for parallel operations. It's much easier now. The more detailed write-up btw of the PSParallel style stuff was in: Quick Way to Run PowerShell in Parallel. You can see in there I ran into a lot of issues. Last tip. Similar to Python, I feel that multithreading is not a first class citizen for PowerShell. It works well in the new 7+ version, but overall consider it much more complicated to debug and work with. For file transfers and things like that, perfect use case. For me I avoid it whenever possible and use it as a last resort to avoid extra complexity. Hope that helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Parallel Powershell for Running SQL
https://www.sheldonhull.com/blog/parallel-powershell-for-running-sql/
Beta Was this translation helpful? Give feedback.
All reactions